Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
strtok.c File Reference
#include <stddef.h>
#include <string.h>
Include dependency graph for strtok.c:

Functions

char * __strtok_r (char *, const char *, char **)
 
char * strtok (char *s, const char *delim)
 Finds the next token in a null-terminated byte string pointed to by s. More...
 

Function Documentation

◆ __strtok_r()

char * __strtok_r ( char *  s,
const char *  delim,
char **  last 
)

References NULL, s, and sc.

Referenced by strtok().

◆ strtok()

char* strtok ( char *  s,
const char *  delim 
)

Finds the next token in a null-terminated byte string pointed to by s.

Finds the next token in a null-terminated byte string pointed to by s. The separator characters are identified by null-terminated byte string pointed to by delim. This function is designed to be called multiples times to obtain successive tokens from the same string.

  • If s != NULL, the call is treated as the first call to strtok for this particular string. The function searches for the first character which is not contained in delim.

The behavior is undefined if either s or delim is not a pointer to a null-terminated byte string.

Parameters
spointer to the null-terminated byte string to tokenize
delimpointer to the null-terminated byte string identifying delimiters
Returns
Returns pointer to the beginning of the next token or NULL if there are no more tokens.

References __strtok_r(), and s.

Referenced by strtok_test().

Here is the caller graph for this function: