| CoreClasses REAL Studio Plugin |
|
StringTokenizerList Class
StringTokenizerList is a high speed string parser which parses a string on the fly.
The main difference between REALbasic built in NthField, StringTokenizerList and StringTokenizerArray:
NthField:Good for short strings with few fields.
Parses the string each time you call it, which means if your string has 1000 fields then the string is parsed 1000 times.
Can random access fields.
Tokens can be previously counted (costing one additional round of parsing)
StringTokenizerList (fastest):
Good for long strings with many fields.
Parses the string once only.
Parsing is done in incremental steps, which means that it will not allocate any additional memory, and that if you have a string with 1000 fields and only want to get the first 3 then only the first part of the string is parsed.
Can not random access fields.
Tokens cannot be previously counted.
StringTokenizerArray (fast):
Good for long strings with many fields.
Parses the string once only.
Parsing is done all at once when the class is constructed. (some additional memory is allocated to store location marks)
Can random access fields.
Tokens can be previously counted (costing no additional round of parsing)
Object
StringTokenizerList
Constructors
Properties
HasMoreTokens | Use this property to check if there are more tokens. |
Methods
GetNext | Use this function to get next item from the StringTokenizerList. |
HasNext | Use to get info if there are more items in the StringTokenizerList. |
MoveFirst | Use to reset the iterator in the StringTokenizerList. |
NextToken | Use this method to get the next token from the StringTokenizerList class. |
PeekNext | Use this function to peek at next item from the StringTokenizerList without causing iteration. |
SkipTokens | Use this method to skip one or more of the next tokens from the list. |
Supported Platforms:
MacOS X PPC - (Mach-O)MacOS X Universal Binary (Mach-O)Win32 - WindowsLinux x86Unsupported Platforms: