Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.util
Class StringSplitUtils  view StringSplitUtils download StringSplitUtils.java

java.lang.Object
  extended byorg.acegisecurity.util.StringSplitUtils

public class StringSplitUtils
extends java.lang.Object

Provides several String manipulation methods.

Version:
$Id: StringSplitUtils.java,v 1.3 2005/11/17 00:56:09 benalex Exp $

Constructor Summary
StringSplitUtils()
           
 
Method Summary
static java.lang.String[] split(java.lang.String toSplit, java.lang.String delimiter)
          Splits a String at the first instance of the delimiter.
static java.util.Map splitEachArrayElementAndCreateMap(java.lang.String[] array, java.lang.String delimiter, java.lang.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

StringSplitUtils

public StringSplitUtils()
Method Detail

split

public static java.lang.String[] split(java.lang.String toSplit,
                                       java.lang.String delimiter)
Splits a String at the first instance of the delimiter.

Does not include the delimiter in the response.


splitEachArrayElementAndCreateMap

public static java.util.Map splitEachArrayElementAndCreateMap(java.lang.String[] array,
                                                              java.lang.String delimiter,
                                                              java.lang.String removeCharacters)
Takes an array of 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.