mirror of
https://github.com/status-im/status-go.git
synced 2025-02-06 03:44:38 +00:00
14 lines
222 B
C
14 lines
222 B
C
#define _GNU_SOURCE
|
|
#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;
|
|
}
|