Description
Moves the internal position of the Tokens StringArray to the first index and then returns the index of the internal position. This will always return a value of 0, since that is the index of the first element in the array. After calling this property, StringTokenizer.NextToken will return the value of the first element in the array.
Timing Precision Mode
This page describes functionality in nanosecond timing precision mode.
Attributes
Type:
|
number
|
Access:
|
read
|
Syntax
myVariable1 = myStringTokenizer1.FirstTokenIndex;
|
The example below shows how to use the StringTokenizer.FirstTokenIndex property to return the internal position to the beginning of the string.
StringTokenizer ST;
ST.StringToParse = "one two three four";
// Report two tokens
Report ST.NextToken;
Report ST.NextToken;
// FirstTokenIndex returns position back to the beginning of the string
Report ST.FirstTokenIndex;
// Report first two tokens again
Report ST.NextToken;
Report ST.NextToken;
|
Output:
NextToken = one
NextToken = two
FirstTokenIndex = 0.000000000
NextToken = one
NextToken = two
|
|
See also
StringTokenizer Object
Parsing Arbitrary String Data
|