|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.util.StringSplitUtils
public class StringSplitUtils
Provides several String manipulation methods.
| Constructor Summary | |
|---|---|
StringSplitUtils()
|
|
| Method Summary | |
|---|---|
static String[] |
split(String toSplit,
String delimiter)
Splits a String at the first instance of the delimiter. |
static Map |
splitEachArrayElementAndCreateMap(String[] array,
String delimiter,
String removeCharacters)
Takes an array of Strings, and for each element removes any instances of
removeCharacter, and splits the element based on the delimiter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringSplitUtils()
| Method Detail |
|---|
public static String[] split(String toSplit,
String delimiter)
String at the first instance of the delimiter.Does not include the delimiter in the response.
toSplit - the string to splitdelimiter - to split the string up with
IllegalArgumentException - if an argument was invalid
public static Map splitEachArrayElementAndCreateMap(String[] array,
String delimiter,
String removeCharacters)
Strings, and for each element removes any instances of
removeCharacter, and splits the element based on the delimiter. A Map is
then generated, with the left of the delimiter providing the key, and the right of the delimiter providing the
value.Will trim both the key and value before adding to the Map.
array - the array to processdelimiter - to split each element using (typically the equals symbol)removeCharacters - one or more characters to remove from each element prior to attempting the split
operation (typically the quotation mark symbol) or null if no removal should occur
Map representing the array contents, or null if the array to process was
null or empty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||