From 7ee19483ed81a885f464d4e93f4eefb3d4037d30 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 4 Jun 2005 15:58:45 +0200 Subject: new world order --- base/util_strsep.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 base/util_strsep.c (limited to 'base/util_strsep.c') diff --git a/base/util_strsep.c b/base/util_strsep.c new file mode 100644 index 00000000..e54903ce --- /dev/null +++ b/base/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