Class StringUtil
java.lang.Object
org.apache.ws.security.util.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]Splits the provided text into an array, separator specified.static booleanstartsWithIgnoreWhitespaces(String prefix, String string) Tests if this string starts with the specified prefix (Ignoring whitespaces)
-
Field Details
-
EMPTY_STRING_ARRAY
An empty immutableStringarray.
-
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
startsWithIgnoreWhitespaces
-
split
Splits the provided text into an array, separator specified. This is an alternative to using StringTokenizer.
The separator is not included in the returned String array. Adjacent separators are treated as one separator.
A
nullinput String returnsnull.StringUtils.split(null, *) = null StringUtils.split("", *) = [] StringUtils.split("a.b.c", '.') = ["a", "b", "c"] StringUtils.split("a..b.c", '.') = ["a", "b", "c"] StringUtils.split("a:b:c", '.') = ["a:b:c"] StringUtils.split("a\tb\nc", null) = ["a", "b", "c"] StringUtils.split("a b c", ' ') = ["a", "b", "c"]- Parameters:
str- the String to parse, may be nullseparatorChar- the character used as the delimiter,nullsplits on whitespace- Returns:
- an array of parsed Strings,
nullif null String input
-