Scilab 5.3.1
- Scilab help
- Strings
- ascii
- blanks
- code2str
- convstr
- emptystr
- eval
- evstr
- grep
- isalphanum
- isascii
- isdigit
- isletter
- isnum
- justify
- length
- part
- regexp
- sci2exp
- str2code
- strcat
- strchr
- strcmp
- strcmpi
- strcspn
- strindex
- string
- strings
- stripblanks
- strncpy
- strrchr
- strrev
- strsplit
- strspn
- strstr
- strsubst
- strtod
- strtok
- tokenpos
- tokens
- tree2code
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
strtok
Split string into tokens
Calling Sequence
res = strtok(str,delimiters)
Arguments
- str
A character string
- delimiters
A character string
- res
A character string
Description
res = strtok(str,delimiters)
sequence of calls to this function split str into tokens, which are sequences of contiguous characters spearated by any of the characters that are part of delimiters.
Examples
TOKENS = []; token = strtok("A string of ,,tokens and some more tokens"," ,"); TOKENS = [TOKENS,token]; while( token <> '' ) token = strtok(" ,"); TOKENS = [TOKENS,token]; end disp(TOKENS);
See Also
<< strtod | Strings | tokenpos >> |