|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pepper.platform.util.StringUtils
public class StringUtils
Utility class for string manipulation functions.
Constructor Summary | |
---|---|
StringUtils()
|
Method Summary | |
---|---|
static boolean |
isBlank(String theString)
Test whether the string is null or empty |
static String |
replace(String str,
String from,
String to)
Replaces all instances of from in str with
to . |
static String |
replaceFirst(String str,
String from,
String to)
Replace the first instance of from in str with
to . |
static String |
stripPrefix(String str,
String prefix)
Strip the prefix from a string. |
static String |
trimAllWhiteSpace(String string)
This method removes any whitespace within a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtils()
Method Detail |
---|
public static String replace(String str, String from, String to)
from
in str
with
to
.
str
- source Stringfrom
- String to be replacedto
- String to replace from
with
str
with all instances of from
replaced
by to
public static String trimAllWhiteSpace(String string)
string
- a String
instance.public static String replaceFirst(String str, String from, String to)
from
in str
with
to
.
str
- source Stringfrom
- String to be replacedto
- String to replace from
with
str
with the first instance of from
replaced
by to
.public static String stripPrefix(String str, String prefix)
str
- String to stripprefix
- Prefix to remove from str
public static boolean isBlank(String theString)
theString
- a String
value
boolean
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |