StringTokenizer.StringTokenizer
Class Overview | Class Members |
This Package |
All Packages
public StringTokenizer( String str,
String delim,
boolean returnTokens )
Parameters
- str
- a string to be parsed.
- delim
- the delimiters.
- returnTokens
- flag indicating whether to return the delimiters
as tokens.
Description
Constructs a string tokenizer for the specified string. The
characters in the delim argument are the delimiters
for separating tokens.
If the returnTokens flag is true, then
the delimiter characters are also returned as tokens. Each
delimiter is returned as a string of length one. If the flag is
false, the delimiter characters are skipped and only
serve as separators between tokens.
public StringTokenizer( String str,
String delim )
Parameters
- str
- a string to be parsed.
- delim
- the delimiters.
Description
Constructs a string tokenizer for the specified string. The
characters in the delim argument are the delimiters
for separating tokens.
public StringTokenizer( String str )
Parameters
- str
- a string to be parsed.
Description
Constructs a string tokenizer for the specified string. The
tokenizer uses the default delimiter set, which is
"\t\n\r": the space character, the tab
character, the newline character, and the carriage-return character.