split string into tokens
res = strtok(str, delimiters)
a character string.
a character string.
a character string.
res = strtok(str, delimiters) sequence of calls to
this function split str into tokens, which are
sequences of contiguous characters separated by any of the
characters that are part of delimiters.
TOKENS = []; token = strtok("A string of ,,tokens and some more tokens"," r,"); TOKENS = [TOKENS,token]; while( token <> '' ) token = strtok(" r,"); TOKENS = [TOKENS,token]; end disp(TOKENS); | ![]() | ![]() |