Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: String Manipulation
See also: atof string substr

Function: strtok
Description: splits a string into tokens. Therefore a set of delimiters has to be specified, i.e., characters that separate the tokens, which are not returned themselves.

Usage: z = strtok (str, del)
Input:
str 1 x 1 vector containing a string which ; should be splitted.
del 1 x 1 vector containing a set of delimiters
Output:
z n x 1 vector, showing the substrings of str

Example:
str="st,rt,o,k"
strtok(str,",")

Result:
Contents of strtok
[1,] "st"
[2,] "rt"
[3,] "o"
[4,] "k"
Example:
str="st,rt-o|k"
strtok(str,",-|")

Result:
Contents of strtok
[1,] "st"
[2,] "rt"
[3,] "o"
[4,] "k"



(C) MD*TECH Method and Data Technologies, 05.02.2006