Next Previous Contents

## 3.157 strtok

> Function

>   Break a string into tokens.

> Header

>   `string.h`

> Declaration

>   `char* __fastcall__ strtok (char* s1, const char* s2);`

> Description

>   `strtok` will break the string s1 into a sequence of tokens, which are delimited by characters from the string s2. The first call to `strtok` will return a pointer to the first token in the string s1. Following calls must pass a `NULL` pointer as s1 in order to get the next token in the string. Different sets of delimiters may be used for the subsequent calls to `strtok`.

> Limits

>   - The function is only available as fastcall function, so it may only be used in presence of a prototype.
>   - `strtok` will modify the string s1.
> Availability

>   ISO 9899

> See also

>   strcspn,

> Example

>   None.

Next Previous Contents