<< Previous | Next >> | |
|
NEAR SYNTAX: char * _n_strtok( char * src, char * brk );
FAR SYNTAX: char far * _f_strtok( char far * src, char far * brk );
NOTE By default, strtok()
is defined to_n_strtok()
.Description
- Scans
src
for tokens separated by delimiter characters specified inbrk
.
- First call with non-null for
src
. Subsequent calls with null forsrc
continue to search tokens in the string. If a token is found (i.e., delineators found), replace the first delimiter insrc
with a null terminator so thatsrc
points to a proper null terminated token.Parameters
- src
- String to be scanned, must be in SRAM, cannot be a constant. In contrast, strings initialized when they are declared are stored in flash memory, and are treated as constants.
- brk
- Character delimiter.
Return value
- Pointer to a token. If no delimiter (therefore no token) is found, returns null.
Library
- STRING.LIB
See also
- strchr, strrchr, strstr, strcspn
Dynamic C Functions | << Previous | Next >> | rabbit.com |