public class

StringTokenizerWithEscape

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.StringTokenizerWithEscape

Class Overview

Works like java.util.StringTokenizer but with support for an escape character. The escape character applies to the delimiter and itself. There are however some differences - see nextToken().

Summary

Public Constructors
StringTokenizerWithEscape(String str, char delim, char esc)
Public Methods
boolean hasMoreTokens()
String nextToken()
String nextToken(boolean escapeResults)
Unlike java.util.StringTokenizer this class will return an empty string if there are consecutive delimiters.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public StringTokenizerWithEscape (String str, char delim, char esc)

Public Methods

public boolean hasMoreTokens ()

public String nextToken ()

Returns

public String nextToken (boolean escapeResults)

Unlike java.util.StringTokenizer this class will return an empty string if there are consecutive delimiters. Returns null if no more tokens exist.

Parameters
escapeResults whether to escape results, i.e. if true, will strip out the escape character when it precedes a delimters/escape character.