|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.znerd.util.text.TextUtils
public class TextUtils
Text string utility functions.
Method Summary | |
---|---|
static boolean |
isEmpty(String s)
Checks if the specified string is either null or empty or contains only whitespace. |
static boolean |
matches(String s,
String regex)
Checks if the specified string matches the specified regular expression. |
static String |
quote(Object o)
Puts quote characters around the string representation of an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final String quote(Object o)
"(null)"
if the object is null
.
public static final boolean isEmpty(String s)
null
or empty or contains only whitespace.
public static final boolean matches(String s, String regex)
This method differs from String.matches(String)
in that this method also supports partial matches. To give an example:
"bla bla".match("bla$"); // returns false TextUtils.matches("bla bla", "bla$"); // returns true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |