StreamTokenizer.quoteChar

StreamTokenizer.quoteChar

Class Overview | Class Members | This Package | All Packages

Syntax
public void quoteChar( int ch )
Parameters
ch
the character.
Description
Specifies that matching pairs of this character delimit string constants in this tokenizer.

When the nextToken method encounters a string constant, the ttype field is set to the string delimiter and the sval field is set to the body of the string.

If a string quote character is encountered, then a string is recognized, consisting of all characters after (but not including) the string quote character, up to (but not including) the next occurrence of that same string quote character, or a line terminator, or end of file. The usual escape sequences such as "\n" and "\t" are recognized and converted to single characters as the string is parsed.

See Also
nextToken, sval, ttype