| java.lang.Object com.vividsolutions.jump.util.StringUtil
StringUtil | public class StringUtil (Code) | | Useful String-related utilities.
|
Method Summary | |
public static List | blankStringList(int size) Returns a List of empty Strings. | public static String | capitalize(String word) | public static String | classNameWithoutPackageQualifiers(String className) | public static String | classNameWithoutQualifiers(String className) | public static String | friendlyName(Class c) | public static List | fromCommaDelimitedString(String s) Converts the comma-delimited string into a List of trimmed strings. | public static String | head(String s, int lines) | public static String | ies(int n) | public static String | insertSpaces(String s) | public static boolean | isEmpty(String value) | public static boolean | isNumber(String token) | public static String | limitLength(String s, int maxLength) | public static String | repeat(char c, int n) | public static String | replace(String original, String oldSubstring, String newSubstring, boolean all) Returns original with occurrences of oldSubstring replaced by
newSubstring. | public static void | replace(StringBuffer orig, String o, String n, boolean all) Replaces all instances of the String o with the String n in the
StringBuffer orig if all is true, or only the first instance if all is
false. | public static String | replaceAll(String original, String oldSubstring, String newSubstring) | public static String | s(int n) | public static String | split(String s, int n) Line-wraps s by inserting a newline instead of the first space after the nth
column. | public static String | stackTrace(Throwable t) | public static String | substitute(String string, Object[] substitutions) | public static String | toCommaDelimitedString(Collection c) Returns the elements of c separated by commas. | public static String | toDelimitedString(Collection c, String delimiter) | public static String | toFriendlyName(String className) | public static String | toFriendlyName(String className, String substringToRemove) | public static String | toTimeString(long milliseconds) | public static String | uncapitalize(String word) |
blankStringList | public static List blankStringList(int size)(Code) | | Returns a List of empty Strings.
Parameters: size - the size of the List to create a List of blank Strings |
classNameWithoutPackageQualifiers | public static String classNameWithoutPackageQualifiers(String className)(Code) | | |
classNameWithoutQualifiers | public static String classNameWithoutQualifiers(String className)(Code) | | |
fromCommaDelimitedString | public static List fromCommaDelimitedString(String s)(Code) | | Converts the comma-delimited string into a List of trimmed strings.
Parameters: s - a String with comma-delimited values a List of the Strings that were delimited by commas |
ies | public static String ies(int n)(Code) | | Warning: hinders internationalization
|
replace | public static String replace(String original, String oldSubstring, String newSubstring, boolean all)(Code) | | Returns original with occurrences of oldSubstring replaced by
newSubstring. Set all to true to replace all occurrences, or false to
replace the first occurrence only.
|
replace | public static void replace(StringBuffer orig, String o, String n, boolean all)(Code) | | Replaces all instances of the String o with the String n in the
StringBuffer orig if all is true, or only the first instance if all is
false. Posted by Steve Chapel on UseNet
|
replaceAll | public static String replaceAll(String original, String oldSubstring, String newSubstring)(Code) | | Returns original with all occurrences of oldSubstring replaced by
newSubstring
|
s | public static String s(int n)(Code) | | Warning: hinders internationalization
|
split | public static String split(String s, int n)(Code) | | Line-wraps s by inserting a newline instead of the first space after the nth
column. Word-wraps.
|
toCommaDelimitedString | public static String toCommaDelimitedString(Collection c)(Code) | | Returns the elements of c separated by commas. If c is empty, an empty
String will be returned.
Parameters: c - a Collection of objects to convert to Strings and delimit by commas a String containing c's elements, delimited by commas |
toTimeString | public static String toTimeString(long milliseconds)(Code) | | |
|
|