|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mortbay.util.StringUtil
Fast String Utilities. These string utilities provide both conveniance methods and performance improvements over most standard library versions. The main aim of the optimizations is to avoid object creation unless absolutely required.
Field Summary | |
static java.lang.String |
__ISO_8859_1
|
static java.lang.String |
__LINE_SEPARATOR
|
Constructor Summary | |
StringUtil()
|
Method Summary | |
static void |
append(java.lang.StringBuffer buf,
byte b,
int base)
|
static void |
append(java.lang.StringBuffer buf,
java.lang.String s,
int offset,
int length)
Append substring to StringBuffer |
static void |
append2digits(java.lang.StringBuffer buf,
int i)
|
static java.lang.String |
asciiToLowerCase(java.lang.String s)
fast lower case conversion. |
static boolean |
endsWithIgnoreCase(java.lang.String s,
java.lang.String w)
|
static boolean |
equals(java.lang.String s,
char[] buf,
int offset,
int length)
|
static int |
indexFrom(java.lang.String s,
java.lang.String chars)
returns the next index of a character from the chars string |
static java.lang.String |
nonNull(java.lang.String s)
Return a non null string. |
static java.lang.String |
replace(java.lang.String s,
java.lang.String sub,
java.lang.String with)
replace substrings within string. |
static boolean |
startsWithIgnoreCase(java.lang.String s,
java.lang.String w)
|
static java.lang.String |
unquote(java.lang.String s)
Remove single or double quotes. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String __LINE_SEPARATOR
public static java.lang.String __ISO_8859_1
Constructor Detail |
public StringUtil()
Method Detail |
public static java.lang.String asciiToLowerCase(java.lang.String s)
s
- the string to convert
public static boolean startsWithIgnoreCase(java.lang.String s, java.lang.String w)
public static boolean endsWithIgnoreCase(java.lang.String s, java.lang.String w)
public static int indexFrom(java.lang.String s, java.lang.String chars)
public static java.lang.String replace(java.lang.String s, java.lang.String sub, java.lang.String with)
public static java.lang.String unquote(java.lang.String s)
public static void append(java.lang.StringBuffer buf, java.lang.String s, int offset, int length)
buf
- StringBuffer to append tos
- String to append fromoffset
- The offset of the substringlength
- The length of the substringpublic static void append(java.lang.StringBuffer buf, byte b, int base)
public static void append2digits(java.lang.StringBuffer buf, int i)
public static java.lang.String nonNull(java.lang.String s)
s
- String
public static boolean equals(java.lang.String s, char[] buf, int offset, int length)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |