RemoveQuotes (StringTokenizer property): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 10: | Line 10: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%bool</th> | <tr><th>%bool</th> | ||
<td>An enumeration object of type Boolean to contain the returned value of RemoveQuotes. For more information about Boolean enumerations, see [[Using Boolean enumerations]]. </td></tr> | <td>An enumeration object of type Boolean to contain the returned value of <var>RemoveQuotes</var>. For more information about Boolean enumerations, see [[Using Boolean enumerations]]. </td></tr> | ||
<tr><th>%tok</th> | <tr><th>%tok</th> | ||
<td>A StringTokenizer object variable.</td></tr> | <td>A <var>StringTokenizer</var> object variable.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
Line 26: | Line 26: | ||
returns <tt>quotes example</tt>, removing the double quotation marks | returns <tt>quotes example</tt>, removing the double quotation marks | ||
from the tokenizer string because that is the default behavior. | from the tokenizer string because that is the default behavior. | ||
Then, after RemoveQuotes is reset to <tt>False</tt>, the next peekToken call | Then, after <var>RemoveQuotes</var> is reset to <tt>False</tt>, the next peekToken call | ||
displays the returned token value with its quotation | displays the returned token value with its quotation | ||
marks (<tt>"quotes example"</tt>): | marks (<tt>"quotes example"</tt>): |
Revision as of 21:47, 6 February 2011
Whether to remove quote characters around returned values of quoted tokens (StringTokenizer class)
This readWrite property returns or sets the Boolean value that indicates
whether to remove the quote characters from the returned values of quoted tokens.
The default value for a new tokenizer is True.
Syntax
%currentBoolean = stringTokenizer:RemoveQuotes stringTokenizer:RemoveQuotes = newBoolean
Syntax terms
%bool | An enumeration object of type Boolean to contain the returned value of RemoveQuotes. For more information about Boolean enumerations, see Using Boolean enumerations. |
---|---|
%tok | A StringTokenizer object variable. |
Usage notes
- The Quotes property returns or resets the values of the current quotation characters. The Quotes characters are initially settable in the New call that creates the tokenizer instance.
Examples
In the following request fragment, the first PeekToken call returns quotes example, removing the double quotation marks from the tokenizer string because that is the default behavior. Then, after RemoveQuotes is reset to False, the next peekToken call displays the returned token value with its quotation marks ("quotes example"):
... %tok = new(Quotes='"') %tok:string = '"quotes example"' Print %tok:peekToken %tok:removeQuotes = False Print %tok:peekToken ...