Package com.microstrategy.utils
Class StringTokenizerWithEscape
- java.lang.Object
-
- com.microstrategy.utils.StringTokenizerWithEscape
-
public class StringTokenizerWithEscape extends java.lang.ObjectWorks likeStringTokenizerbut with support for an escape character. The escape character applies to the delimiter and itself. There are however some differences - seenextToken().- Since:
- MicroStrategy Web 9.0.1
-
-
Constructor Summary
Constructors Constructor Description StringTokenizerWithEscape(java.lang.String str, char delim, char esc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasMoreTokens()java.lang.StringnextToken()java.lang.StringnextToken(boolean escapeResults)UnlikeStringTokenizerthis class will return an empty string if there are consecutive delimiters.
-
-
-
Method Detail
-
hasMoreTokens
public boolean hasMoreTokens()
-
nextToken
public java.lang.String nextToken()
- Returns:
nextToken(boolean)with 'escapeResults' set to true
-
nextToken
public java.lang.String nextToken(boolean escapeResults)
UnlikeStringTokenizerthis 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.
-
-