STRTOK
Section: Linux Programmer's Manual (3)
Updated: April 12, 1993
Index
Return to Main Contents
NAME
strtok - extract token from string
SYNOPSIS
#include <string.h>
char *strtok(char *s, const char *delim);
DESCRIPTION
The strtok() function breaks the string s into a series
of tokens delimited by delim. The first call to strtok()
should have s as the first argument. Subsequent calls should
have the first argument set to NULL. The separator string delim
may be different for each call.
The first call to strtok() returns the first token in s or
NULL if delim is not found in s. A pointer to the next
character is saved for the next call to strtok. Subsequent calls
return subsequent tokens until delim is no longer found, when
NULL is returned.
RETURN VALUE
The strtok() function returns a pointer to the next token, or
NULL if there are no more tokens.
CONFORMING TO
SVID 3, POSIX, BSD 4.3, ISO 9899
SEE ALSO
index(3), memchr(3), rindex(3), strchr(3),
strpbrk(3), strsep(3), strspn(3), strstr(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- CONFORMING TO
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 12:24:04 GMT, March 22, 2025