blob: e54903ce39e7384c2d90520bfdecd02c35e80849 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#include <string.h>
char *strsep(char **stringp, const char *delim)
{
char *ret = *stringp;
if (ret == NULL) return NULL;
if ((*stringp = strpbrk(*stringp, delim)) != NULL)
*((*stringp)++) = '\0';
return ret;
}
|