org.apache.tapestry.util
Class StringSplitter

java.lang.Object
  extended by org.apache.tapestry.util.StringSplitter

public class StringSplitter
extends Object

Used to split a string into substrings based on a single character delimiter. A fast, simple version of StringTokenizer.

Version:
$Id: StringSplitter.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
StringSplitter(char delimiter)
           
 
Method Summary
 char getDelimiter()
           
 String[] splitToArray(String value)
          Splits a string on the delimter into an array of String tokens.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringSplitter

public StringSplitter(char delimiter)
Method Detail

getDelimiter

public char getDelimiter()

splitToArray

public String[] splitToArray(String value)
Splits a string on the delimter into an array of String tokens. The delimiters are not included in the tokens. Null tokens (caused by two consecutive delimiter) are reduced to an empty string. Leading delimiters are ignored.