CStrTok Class Description
The CStrTok class is used to parse a target string into shorter strings bounded by separator characters. This process is known as "tokenizing". For example, a string might contain 10 values separated by commas which must be split into 10 pieces, or "token". Any number of separator characters may be specified. To parse the string into tokens, use the Next method to return each piece until it returns nil indicating no more pieces exist. This class works like the C language strtok() function.
Construction |
Object = new_strtok() Object = CStrTok:new() |
Destruction |
Object:delete() |
This function is normally used to create a new CStrTok object as an alternative to the class-based new method.
Global function that creates a new CStrTok object. |
Creates a new instance of a CStrTok object. Various constructors are available. The target string and delimiters may be specified in the constructor. |
|
Deletes the instance of the CStrTok object. |
Initializes the target string and delimiters. You also can do this in the new method when you create an instance of the class. |
|
Specifies the character delimiters to use henceforth while tokenizing the target string. The delimiter is initially set using new or Init, but this method allows you to change it while the string is being parsed. |
|
Returns the next string token. |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.