NotAtEnd (StringTokenizer function): Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→Usage notes) |
||
Line 32: | Line 32: | ||
<li> <var>NextTokenPositin</var> may be after the last token but | <li> <var>NextTokenPositin</var> may be after the last token but | ||
not necessarily at the end of the token string. | not necessarily at the end of the token string. | ||
In the following code sequence, the return from <var>NotAtEnd</var> is <code> | In the following code sequence, the return from <var>NotAtEnd</var> is <code>false</code> | ||
and the position is not at the end of the string: | and the position is not at the end of the string: | ||
<p class="code">%tok:string = 'example ' | <p class="code">%tok:string = 'example ' | ||
%tok:nextPosition = | %tok:nextPosition = 8 | ||
%tok:notAtEnd | printText {~=%tok:notAtEnd} | ||
</p> | </p> | ||
<li><var>[[AtEnd (StringTokenizer function)|AtEnd]]</var> is the reverse of <var>NotAtEnd</var>: | <li><var>[[AtEnd (StringTokenizer function)|AtEnd]]</var> is the reverse of <var>NotAtEnd</var>: | ||
it returns a <code> | it returns a <code>false</code> value if the current tokenizing position is not at the end of the string. | ||
</ul> | </ul> | ||
==See also== | ==See also== | ||
{{Template:StringTokenizer:NotAtEnd footer}} | {{Template:StringTokenizer:NotAtEnd footer}} |
Revision as of 20:57, 27 October 2012
Is present tokenizing position at end of tokenizerstring? (StringTokenizer class)
This method returns a Boolean value that is true
if
any tokens remain starting from NextPosition.
Syntax
%boolean = stringTokenizer:NotAtEnd
Syntax terms
%boolean | An enumeration object of type Boolean to contain the returned value of NotAtEnd. The result is true if any tokens remain, starting from NextPosition, and false if no tokens remain.
For more information about Boolean enumerations, see "Using Boolean Enumerations". |
---|---|
stringTokenizer | A StringTokenizer object expression. |
Usage notes
- It is illegal to scan for a token past the CurrentToken if NotAtEnd is
false
. - For Spaces tokenization, a token remains if there are any non-Spaces characters remaining at or after NextPosition.
- For Separators tokenization, a token remains if either:
- NextPosition is less than or equal to the length of the String.
- Either a token has not been located in the String, or the last method which located a token found a separator at the end of the String.
- NextTokenPositin may be after the last token but
not necessarily at the end of the token string.
In the following code sequence, the return from NotAtEnd is
false
and the position is not at the end of the string:%tok:string = 'example ' %tok:nextPosition = 8 printText {~=%tok:notAtEnd}
- AtEnd is the reverse of NotAtEnd:
it returns a
false
value if the current tokenizing position is not at the end of the string.