CStrTok:Init
The Init method initializes the CStrTok object to a target string and list of delimiters. This is usually done when the CStrTok object is constructed using new. Use the Init method when you want to change the string or delimiters for an existing CStrTok object or when you created the object using the default new without passing any arguments.
CStrTok:Init( sStr, sDelim )
sStr is the target string.
sDelim is a string containing the delimiter characters.
The following script parses two strings sStr and sNewStr into pieces delimited by delimiter characters sDelim. This also could be done using two instances of CStrTok.
|
-- delimiters comma, blank, tab, new line, and return |
|
-- create a new CStrTok object initialized to the target |
|
-- string sStr and delimiters sDelim |
|
-- parse sStr and work with it |
|
|
|
-- change to a new string |
|
|
|
-- parse the new string and work with it |
|
-- delete the object and its associated memory. |
CStrTok, new, Next, SetDelimiter
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.