Embedded TCP/IP stack: fnet_strtok_r

FNET

fnet_char_t* fnet_strtok_r ( fnet_char_t str,
const fnet_char_t delimiter,
fnet_char_t **  last 
)

Breaks a string into a sequence of tokens.

Parameters
strThe string from which to extract tokens (null-terminated).
delimiterThe string that contains a set of delimiter characters (null-terminated).
lastReturn parameter used by fnet_strtok_r() to record its progress through str.
This pointer, must be the same while parsing the same string.
Returns
This function returns a pointer to the next token in str. If there are no remaining tokens, it returns a FNET_NULL pointer.

This function parses the string str into tokens.
The first function call should have str as its first argument. Subse- quent calls should have the first argument set to FNET_NULL. Each call returns a pointer to the next token, or FNET_NULL when no more tokens are found.
The function also updates the last parameter with the starting address of the token following the first occurrence of the delimiter parameter.
The delimiter string may be different for each call.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net