EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.util
Class TokenizerKit

java.lang.Object
  extended by echopoint.util.TokenizerKit

public class TokenizerKit
extends Object

The TokenizerKit class is useful for break a String down into an array of "Token" strings. This class is more powerful than the standard java.util.StringTokenizer.


Method Summary
static String[] splitIntoLines(String str)
          This will split the given string into a series of lines (with no delimeters in the lines themselves)
static String[] tokenize(String str, String delims)
          Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " as well defining whitespace characters 0 to 32 as delimeters.
static String[] tokenize(String str, String delims, boolean returnDelimeters)
          Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " as well defining whitespace characters 0 to 32 as delimeters.
static String[] tokenizeStrict(String str, String delims)
          Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " but the common whitespace characters space, tab, carriage return and newline are no longer whitespace.
static String[] tokenizeStrict(String str, String delims, boolean returnDelimeters)
          Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " but the common whitespace characters space, tab, carriage return and newline are no longer whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

tokenize

public static String[] tokenize(String str,
                                String delims)
Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " as well defining whitespace characters 0 to 32 as delimeters.

Parameters:
str - - the string to tokenize
delims - - the string of allowable delimeter characters
Returns:
a String[] of tokens

tokenizeStrict

public static String[] tokenizeStrict(String str,
                                      String delims)
Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " but the common whitespace characters space, tab, carriage return and newline are no longer whitespace.

Parameters:
str - - the string to tokenize
delims - - the string of allowable delimeter characters
Returns:
a String[] of tokens

tokenize

public static String[] tokenize(String str,
                                String delims,
                                boolean returnDelimeters)
Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " as well defining whitespace characters 0 to 32 as delimeters.

Parameters:
str - - the string to tokenize
delims - - the string of allowable delimeter characters
returnDelimeters - - if true then delimeters will be returned in the tokens array
Returns:
a String[] of tokens

tokenizeStrict

public static String[] tokenizeStrict(String str,
                                      String delims,
                                      boolean returnDelimeters)
Tokenizes a string into an array of Strings based on the delimeters while respecting the quote characters ' and " but the common whitespace characters space, tab, carriage return and newline are no longer whitespace.

Parameters:
str - - the string to tokenize
delims - - the string of allowable delimeter characters
returnDelimeters - - if true then delimeters will be returned in the tokens array
Returns:
a String[] of tokens

splitIntoLines

public static String[] splitIntoLines(String str)
This will split the given string into a series of lines (with no delimeters in the lines themselves)

Parameters:
str - - the String to split into lines
Returns:
a String[] of lines

EchoPoint API - 3.0.0b5
App Webcontainer