From 6ddde92a3a45e970b05770633dc6a337d5d013c5 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 27 Sep 2004 02:15:04 +0200 Subject: Initial import --- util/strsep.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 util/strsep.c (limited to 'util/strsep.c') diff --git a/util/strsep.c b/util/strsep.c new file mode 100644 index 00000000..e54903ce --- /dev/null +++ b/util/strsep.c @@ -0,0 +1,11 @@ +#include + +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; +} + -- cgit v1.2.3