| MATLAB Function Reference | Search  Help Desk |
| strtok | Examples See Also |
token = strtok('str',delimiter)
token = strtok('str')
[token,rem] = strtok(...)
token = strtok('str',delimiter)
returns the first token in the text string str, that is, the first set of characters before a delimiter is encountered. The vector delimiter contains valid delimiter characters.
token = strtok('str')
uses the default delimiters, the white space characters. These include tabs (ASCII 9), carriage returns (ASCII 13), and spaces (ASCII 32).
[token,rem] = strtok(...)
returns the remainder rem of the original string. The remainder consists of all characters from the first delimiter on.
s = 'This is a good example.'; [token,rem] = strtok(s) token = This rem = is a good example.
findstr Find one string within another
strmatch Find possible matches for a string