Script functions reference > Script functions in alphabetical order > S > StrQTok

StrQTok
Syntax
StrQTok(str, char_sep, quote_char, esc_char, result_array);
str 
char_sep 
quote_char 
esc_char 
result_array 
Description
Takes four strings and a one-dimensional array and returns a numeric value indicating the number of tokens passed into the array.
Returns
A numeric value indicating the number of tokens passed into the array.
Example
$var1="123:abc:’A, B and /’C/’’";
//Single quotes are used for strings
//containing separators.
//The escape character for single quotes
//in quoted strings is "/".
$num_of_tokens=StrQTok($var1,":","’","/",$arr1);
Result:
$num_of_tokens=3
$arr1[0]="123"
$arr1[1]="abc"
$arr1[2]="A, B and ’C’"
OpenText StreamServe 5.6 Updated: 2013-03-01