jltools.util
Class StringUtil
java.lang.Object
|
+--jltools.util.StringUtil
- public class StringUtil
- extends java.lang.Object
String utilities.
Method Summary |
static java.lang.String |
escape(char c)
|
static java.lang.String |
escape(java.lang.String s)
|
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 |
removeFirstComponent(java.lang.String fullName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringUtil
public StringUtil()
getPackageComponent
public 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.
getShortNameComponent
public 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.
isNameShort
public 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.)
getFirstComponent
public static java.lang.String getFirstComponent(java.lang.String fullName)
removeFirstComponent
public static java.lang.String removeFirstComponent(java.lang.String fullName)
escape
public static java.lang.String escape(java.lang.String s)
escape
public static java.lang.String escape(char c)