mirror of
https://github.com/fluencelabs/musl
synced 2025-06-13 23:11:51 +00:00
13 lines
202 B
C
13 lines
202 B
C
![]() |
#include <string.h>
|
||
|
|
||
|
char *strsep(char **str, const char *sep)
|
||
|
{
|
||
|
char *s = *str, *end;
|
||
|
if (!s) return NULL;
|
||
|
end = s + strcspn(s, sep);
|
||
|
if (*end) *end++ = 0;
|
||
|
else end = 0;
|
||
|
*str = end;
|
||
|
return s;
|
||
|
}
|