Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
strsep(3)
Edit
PageHistory
Diff
Info
LikePages
STRSEP !!!STRSEP NAME SYNOPSIS DESCRIPTION RETURN VALUE NOTES BUGS CONFORMING TO SEE ALSO ---- !!NAME strsep - extract token from string !!SYNOPSIS __#include __''stringp''__, const char *__''delim''__); __ !!DESCRIPTION If *''stringp'' is NULL, the __strsep()__ function returns NULL and does nothing else. Otherwise, this function finds the first token in the string *''stringp'', where tokens are delimited by symbols in the string ''delim''. This token is terminated with a `0' character (by overwriting the delimiter) and *''stringp'' is updated to point past the token. In case no delimiter was found, the token is taken to be the entire string *''stringp'', and *''stringp'' is made NULL. !!RETURN VALUE The __strsep()__ function returns a pointer to the token, that is, it returns the original value of *''stringp''. !!NOTES The __strsep()__ function was introduced as a replacement for __strtok()__, since the latter cannot handle empty fields. However, __strtok()__ conforms to ANSI-C and hence is more portable. !!BUGS This function suffers from the same problems as __strtok()__. In particular, it modifies the original string. Avoid it. !!CONFORMING TO BSD 4.4 !!SEE ALSO index(3), memchr(3), rindex(3), strchr(3), strpbrk(3), strspn(3), strstr(3), strtok(3) ----
13 pages link to
strsep(3)
:
Man3s
index(3)
memchr(3)
rindex(3)
strchr(3)
strcspn(3)
string(3)
strpbrk(3)
strrchr(3)
strspn(3)
strstr(3)
strtok(3)
strtok_r(3)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.