RemoveQuotes (StringTokenizer property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (fix "using boolean enumerations" link)
 
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:StringTokenizer:RemoveQuotes subtitle}}
{{Template:StringTokenizer:RemoveQuotes subtitle}}


This readWrite property returns or sets the Boolean value that indicates
This readWrite property returns or sets the <var>[[Boolean enumeration|Boolean]]</var> value that indicates
whether to remove the quote characters from the returned values of quoted tokens.
whether to remove the quote characters from the returned values of quoted tokens.
The default value for a new tokenizer is <tt>True</tt>.
The default value for a new tokenizer is <var>True</var>.


==Syntax==
==Syntax==
{{Template:StringTokenizer:RemoveQuotes syntax}}
{{Template:StringTokenizer:RemoveQuotes syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%currentBoolean</th>
<tr><th>%currentBoolean</th>
<td>A <var>Boolean</var> enumeration object to contain the returned value of <var>RemoveQuotes</var>. For more information about <var>Boolean</var> enumerations, see [[Enumerations#Using_Boolean_enumerations|"Using Boolean Enumerations"]].</td></tr>
<td>A <var>Boolean</var> enumeration object to contain the returned value of <var>RemoveQuotes</var>. </td></tr>
 
<tr><th>stringTokenizer</th>
<tr><th>stringTokenizer</th>
<td>A <var>StringTokenizer</var> object expression.</td></tr>
<td>A <var>StringTokenizer</var> object expression.</td></tr>
<tr><th>newBoolean</th>
<tr><th>newBoolean</th>
<td>The <var>Boolean</var> value to assign to <var class="term>stringTokenizer</var>'s <var>RemoveQuotes</var> property.</td></tr>
<td>The <var>Boolean</var> value to assign to <var class="term>stringTokenizer</var>'s <var>RemoveQuotes</var> property.</td></tr>
Line 19: Line 22:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The [[Quotes (StringTokenizer property)|Quotes]] property returns or resets the values of the
<li>The <var>[[Quotes (StringTokenizer property)|Quotes]]</var> property returns or resets the values of the
current quotation characters.
current quotation characters.
The Quotes characters are initially settable in the
The <var>Quotes</var> characters are initially settable in the
[[New (StringTokenizer constructor)|New]] call that creates the tokenizer instance.
<var>[[New (StringTokenizer constructor)|New]]</var> call that creates the tokenizer instance.
</ul>
</ul>
==Examples==
==Examples==
 
In the following request fragment, the first <var>[[PeekToken (StringTokenizer function)|PeekToken]]</var> call
In the following request fragment, the first [[PeekToken (StringTokenizer function)|PeekToken]] call
returns <code>quotes example</code>, 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 <var>RemoveQuotes</var> is reset to <tt>False</tt>, the next peekToken call
Then, after <var>RemoveQuotes</var> is reset to <code>False</code>, the next <var>PeekToken</var> call
displays the returned token value with its quotation
displays the returned token value with its quotation
marks (<tt>"quotes example"</tt>):
marks (<code>"quotes example"</code>):
<p class="code">...
<p class="code">...
%tok = new(Quotes='"')
%tok = new(Quotes='"')
Line 40: Line 43:
...
...
</p>
</p>
==See also==
==See also==
{{Template:StringTokenizer:RemoveQuotes footer}}
{{Template:StringTokenizer:RemoveQuotes footer}}

Latest revision as of 00:52, 6 July 2012

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

%currentBoolean A Boolean enumeration object to contain the returned value of RemoveQuotes.
stringTokenizer A StringTokenizer object expression.
newBoolean The Boolean value to assign to stringTokenizer's RemoveQuotes property.

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