diff options
Diffstat (limited to 'lib/string/strsep.c')
| -rw-r--r-- | lib/string/strsep.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/string/strsep.c b/lib/string/strsep.c deleted file mode 100644 index 2d513f4..0000000 --- a/lib/string/strsep.c +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: MIT */ -/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */ - -#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; -} |
