RemoveQuotes (StringTokenizer property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<span style="font-size:120%; color:black"><b>Whether to remove quote characters around returned values of quoted tokens</b></span>
{{Template:StringTokenizer:RemoveQuotes subtitle}}
[[Category:StringTokenizer methods|RemoveQuotes property]]
<!--DPL?? Category:StringTokenizer methods|RemoveQuotes property: Whether to remove quote characters from returned values-->
<!--DPL?? Category:System methods|RemoveQuotes (StringTokenizer property): Whether to remove quote characters from returned values-->
<p>
RemoveQuotes is a member of the [[StringTokenizer class]].
</p>


This readWrite property returns or sets the Boolean value that indicates
This readWrite property returns or sets the Boolean value that indicates
Line 11: Line 5:
The default value for a new tokenizer is <tt>True</tt>.
The default value for a new tokenizer is <tt>True</tt>.


===Syntax===
==Syntax==
  %bool = %tok:RemoveQuotes
{{Template:StringTokenizer:RemoveQuotes syntax}}
 
  %tok:RemoveQuotes = %bool
===Syntax terms===
===Syntax terms===
<dl>
<dl>
Line 25: Line 17:


</dl>
</dl>
===Usage Notes===
==Usage notes==
<ul>
<ul>
<li>The [[Quotes (StringTokenizer property)|Quotes]] property returns or resets the values of the
<li>The [[Quotes (StringTokenizer property)|Quotes]] property returns or resets the values of the
Line 32: Line 24:
[[New (StringTokenizer constructor)|New]] call that creates the tokenizer instance.
[[New (StringTokenizer constructor)|New]] call that creates the tokenizer instance.
</ul>
</ul>
===Examples===
==Examples==


In the following request fragment, the first [[PeekToken (StringTokenizer function)|PeekToken]] call
In the following request fragment, the first [[PeekToken (StringTokenizer function)|PeekToken]] call
Line 49: Line 41:
     ...
     ...
</pre>
</pre>
==See also==
{{Template:StringTokenizer:RemoveQuotes footer}}

Revision as of 19:54, 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
     ...

See also