projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
1bfe1db1cc23bc666c667e27d7f5760ca99f79b2
[musl]
/
src
/
string
/
strsep.c
1
#include <string.h>
2
3
char *strsep(char **str, const char *sep)
4
{
5
char *s = *str, *end;
6
if (!s) return NULL;
7
end = s + strcspn(s, sep);
8
if (*end) *end++ = 0;
9
else end = 0;
10
*str = end;
11
return s;
12
}