MATLAB Function Reference    

First token in string



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. Any leading delimiters are ignored.

token = strtok('str') uses the default delimiters, the white space characters. These include tabs (ASCII 9), carriage returns (ASCII 13), and spaces (ASCII 32). Any leading white space characters are ignored.

[token,rem] = strtok(...) returns the remainder rem of the original string. The remainder consists of all characters from the first delimiter on.


See Also

findstr, strmatch

  strrep struct