|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscriptella.util.StringUtils
public final class StringUtils
Miscellaneous String/CharSequence utility methods.
| Method Summary | |
|---|---|
static java.lang.String |
consoleFormat(java.lang.String string)
Formats specified string for console suitable representation. |
static java.lang.String |
consoleFormat(java.lang.String string,
int maxLength)
Formats specified string for console suitable representation. |
static boolean |
isAsciiWhitespacesOnly(java.lang.CharSequence cs)
Checks if specified characters sequence is empty or contains only ascii whitespace characters. |
static boolean |
isDecimalInt(java.lang.CharSequence cs)
Checks if specified characters sequence represents a non negative decimal number. |
static boolean |
isEmpty(java.lang.CharSequence cs)
Returns true if characters sequence is empty (length=0) or null. |
static java.lang.String |
nullsafeToString(java.lang.Object o)
Returns Null safe string representation of specified object. |
static java.lang.String |
nullsafeTrim(java.lang.CharSequence cs)
Returns a trimmed value for specified charsequence |
static java.lang.String |
removePrefix(java.lang.String string,
java.lang.String prefix)
Removes a prefix from a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isEmpty(java.lang.CharSequence cs)
cs - characters sequence to test.
public static java.lang.String nullsafeTrim(java.lang.CharSequence cs)
cs - charsequence to trim.
public static java.lang.String nullsafeToString(java.lang.Object o)
o - object to convert to String.
o.toString() or "" if o==null.public static boolean isAsciiWhitespacesOnly(java.lang.CharSequence cs)
cs - characters sequence to check.
public static boolean isDecimalInt(java.lang.CharSequence cs)
cs - characters sequence to check.
public static java.lang.String consoleFormat(java.lang.String string)
All EOL char sequences are replaced with a single system line.separator, and all other whitespace sequences are replaced with a single space.
String larger than 10KB are trimmed.
string - string to format. Nulls are allowed.
public static java.lang.String consoleFormat(java.lang.String string,
int maxLength)
All EOL char sequences are replaced with a single system line.separator, and all other whitespace sequences are replaced with a single space.
string - string to format. Nulls are allowed.maxLength - maximum number of characters to show or negative if the string cannot be trimmed.
public static java.lang.String removePrefix(java.lang.String string,
java.lang.String prefix)
string - original string. May be null.prefix - prefix to to check and remove. May be null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||