strtok()

Function groupExecute on clientPlatform(s)
StringNOAll

Syntax

strtok('string1',string2)

Description

Removes and returns the next token from string1 (passed either as a quoted variable name, or the result of nam(variable)). Tokens are delimited by any character in string2.

This function returns tokens which are a substring of string1 until any character in string2 matches a character in string1. When strtok() is called, the token found in string1 is removed, so that the function looks for the next token the next time it is called.

Note:strtok() does not support null characters in string1 or string2

Example

Calculate
 
lString1
 as 
"The quick brown fox, jumped over the lazy dog"

Repeat
  
Calculate
 
lString2
 as 
strtok
(
'lString1'
,
" "
)

  
OK message
 
{
Token = [
lString2
]
}

Until
 
lString2
=
''

# returns each word in lString1 in an OK Message