public class StringUtil
extends java.lang.Object
Constructor and Description |
---|
StringUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escape(char c) |
static java.lang.String |
escape(java.lang.String s) |
static java.lang.String |
escape(java.lang.String s,
boolean unicode) |
static java.lang.String |
getFirstComponent(java.lang.String fullName) |
static java.lang.String |
getPackageComponent(java.lang.String fullName)
Given the name for a class, returns the portion which appears to
constitute the package -- i.e., all characters up to but not including
the last dot, or no characters if the name has no dot.
|
static java.lang.String |
getShortNameComponent(java.lang.String fullName)
Given the name for a class, returns the portion which appears to
constitute the package -- i.e., all characters after the last
dot, or all the characters if the name has no dot.
|
static boolean |
isNameShort(java.lang.String name)
Returns true iff the provided class name does not appear to be
qualified (i.e., it has no dot.)
|
static java.lang.String |
nth(int n) |
static java.lang.String |
removeFirstComponent(java.lang.String fullName) |
static java.lang.String |
unicodeEscape(char c) |
static java.lang.String |
unicodeEscape(java.lang.String s) |
public static java.lang.String getPackageComponent(java.lang.String fullName)
public static java.lang.String getShortNameComponent(java.lang.String fullName)
public static boolean isNameShort(java.lang.String name)
public static java.lang.String getFirstComponent(java.lang.String fullName)
public static java.lang.String removeFirstComponent(java.lang.String fullName)
public static java.lang.String escape(java.lang.String s)
public static java.lang.String escape(char c)
public static java.lang.String unicodeEscape(java.lang.String s)
public static java.lang.String unicodeEscape(char c)
public static java.lang.String escape(java.lang.String s, boolean unicode)
public static java.lang.String nth(int n)