MATLAB Function Reference
  Go to function:
    Search    Help Desk 
strtok    Examples   See Also

First token in string

Syntax

Description

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.

Examples

See Also

findstr     Find one string within another

strmatch    Find possible matches for a string



[ Previous | Help Desk | Next ]