Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.595 strtok

strtok( [target,] delimiters [, /skip_final_delim])

This function finds the next token in an installed string and returns it. The returned token consists of the next set of characters, if any, that are not in string delimiters; or (if no such characters remain in the installed string and if also /skip_final_delim has not been chosen) of the remainder of the installed string (which consists only of characters that are in delimiters); or (if no characters at all remain) an empty string.

a new target string is installed (in the place of any older one) through specification of target. Each next call to strtok without a target returns the next token from the last installed string.

Neither of the arguments is modified by calls to strtok, and delimiter may have different values from call to call.