|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrle.util.StringUtil
public class StringUtil
Utility class for string processing.
Field Summary | |
---|---|
static int |
INVALID
|
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static java.lang.String[] |
extend(java.lang.String[] a,
java.lang.String s)
Return a new array with s appended to a. |
static java.lang.String[] |
extend(java.lang.String[] a,
java.lang.String[] s)
Return a new array with s appended to a. |
static java.lang.String |
getDelimitedString(java.util.Collection coll,
java.lang.String delim)
Take Collection l and build a String of the elements in l delimited by d. |
static java.lang.String |
initCap(java.lang.String s)
Sets all Characters to Lower and then Capitaizes the First Leter. |
static int |
intValue(java.lang.Object o)
Vigorously attempt to retrieve an int value from o. |
static int |
parseInt(java.lang.String s)
Safely parse an int, 0 if invalid |
static int |
parseInt(java.lang.String s,
int def)
Safely parse an int, default if invalid |
static java.util.Map<java.lang.String,java.lang.String> |
parseMap(java.lang.String s)
Parse a space delimited String into a map eg key=1 hp=25 would parse into a map with keys key and hp, and values 1 and 25 respectively. |
static java.util.Map<java.lang.String,java.lang.String> |
parseMap(java.lang.String s,
java.lang.String delimiter)
Parse a space delimited String into a map eg key=1 hp=25 would parse into a map with keys key and hp, and values 1 and 25 respectively. |
static java.util.Map |
parsePrefixMap(java.lang.String text,
java.lang.String prefix)
Parse the line delimited text into a map for only those lines starting with the prefix. |
static java.lang.String |
replace(java.util.Map map,
java.lang.String text)
Replaces all instances of keys with values in map. |
static java.lang.String |
replace(java.util.Map map,
java.lang.String text,
java.lang.String tagStart,
java.lang.String tagEnd)
Replaces all instances of keys with values in map. |
static java.lang.String |
replace(java.lang.String pattern,
java.lang.String replacement,
java.lang.String text)
Replaces all instances of pattern in text with replacement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INVALID
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public static java.lang.String getDelimitedString(java.util.Collection coll, java.lang.String delim)
public static java.lang.String replace(java.util.Map map, java.lang.String text, java.lang.String tagStart, java.lang.String tagEnd)
public static java.lang.String replace(java.util.Map map, java.lang.String text)
public static java.lang.String replace(java.lang.String pattern, java.lang.String replacement, java.lang.String text)
public static java.lang.String[] extend(java.lang.String[] a, java.lang.String s)
public static java.lang.String[] extend(java.lang.String[] a, java.lang.String[] s)
public static java.lang.String initCap(java.lang.String s)
public static java.util.Map<java.lang.String,java.lang.String> parseMap(java.lang.String s)
public static java.util.Map<java.lang.String,java.lang.String> parseMap(java.lang.String s, java.lang.String delimiter)
public static java.util.Map parsePrefixMap(java.lang.String text, java.lang.String prefix)
public static int parseInt(java.lang.String s)
public static int parseInt(java.lang.String s, int def)
public static int intValue(java.lang.Object o)
o
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |