String (StringTokenizer property): Difference between revisions
Jump to navigation
Jump to search
m (→Usage notes) |
mNo edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Template:StringTokenizer:String subtitle}} | {{Template:StringTokenizer:String subtitle}} | ||
This readWrite property returns or sets the string to be tokenized. | This [[Classes and Objects#readWrite|readWrite]] property returns or sets the string to be tokenized. | ||
==Syntax== | ==Syntax== | ||
{{Template:StringTokenizer:String syntax}} | {{Template:StringTokenizer:String syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%currentString</th> | <tr><th>%currentString</th> | ||
<td>A string variable to contain the returned or set value of the string to be tokenized. The default value is a null string. </td></tr> | <td>A string variable to contain the returned or set value of the string to be tokenized. The default value is a null string. </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>newString</th> | <tr><th>newString</th> | ||
<td>The String value to assign to <var class="term">stringTokenizer</var>'s <var>String</var> property.</td></tr> | <td>The <var>String</var> type value to assign to <var class="term">stringTokenizer</var>'s <var>String</var> property.</td></tr> | ||
</table> | </table> | ||
== | |||
==Usage notes== | |||
<ul> | <ul> | ||
<li>When the <var>String</var> method assigns a string, it | <li>When the <var>String</var> method assigns a string, it resets to <code>0</code> the <var>[[NextPosition (StringTokenizer property)|NextPosition]]</var> value, | ||
resets to <code>0</code> the <var>[[NextPosition (StringTokenizer property)|NextPosition]]</var> value, | |||
and it invalidates the value of <var>[[CurrentToken (StringTokenizer function)|CurrentToken]]</var> | and it invalidates the value of <var>[[CurrentToken (StringTokenizer function)|CurrentToken]]</var> | ||
and the value of <var>[[CurrentTokenPosition (StringTokenizer property)|CurrentTokenPosition]]</var>. | and the value of <var>[[CurrentTokenPosition (StringTokenizer property)|CurrentTokenPosition]]</var>. | ||
Line 23: | Line 26: | ||
==Examples== | ==Examples== | ||
The following statement sets the value of the input string of the <code>%toc</code> <var>StringTokenizer</var> object: | |||
The following statement sets the value of the input string | |||
of the %toc <var>StringTokenizer</var> object: | |||
<p class="code">%toc:string = 'A String example!' | <p class="code">%toc:string = 'A String example!' | ||
</p> | </p> |
Latest revision as of 20:51, 15 November 2012
The string to be tokenized (StringTokenizer class)
This readWrite property returns or sets the string to be tokenized.
Syntax
%currentString = stringTokenizer:String stringTokenizer:String = newString
Syntax terms
%currentString | A string variable to contain the returned or set value of the string to be tokenized. The default value is a null string. |
---|---|
stringTokenizer | A StringTokenizer object expression. |
newString | The String type value to assign to stringTokenizer's String property. |
Usage notes
- When the String method assigns a string, it resets to
0
the NextPosition value, and it invalidates the value of CurrentToken and the value of CurrentTokenPosition.
Examples
The following statement sets the value of the input string of the %toc
StringTokenizer object:
%toc:string = 'A String example!'