int findt(string [n] [delim] [flags])
string - string to search in.
n - 0-based index of token. Default: -1.
delim - delimiters.
0x100 | delim is table of delimiters. |
0x200 | QM 2.3.3. Add blanks to delim. |
Returns 0-based index of first character of n-th token (substring delimited by characters in delim) in string. If there are less than n+1 tokens, returns -1.
If n is omitted or negative, finds next token. It works in same function only.
To find lines, use findl.
find the second token str s = "my.exe /cl" int i = findt(s 1 " .:\/''[]") out i ;;3 for each word int t for t 0 1000000000 i=findt(s -t) if(i<0) break out i