diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-06-04 15:58:45 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-06-04 15:58:45 +0200 |
commit | 7ee19483ed81a885f464d4e93f4eefb3d4037d30 (patch) | |
tree | e4d3faf561e694ae0cc7873381450db6a011ab5a /base/util_strsep.c | |
parent | af699a4657e103bd8fa72356eb3abebf221fe93a (diff) | |
download | mupdf-7ee19483ed81a885f464d4e93f4eefb3d4037d30.tar.xz |
new world order
Diffstat (limited to 'base/util_strsep.c')
-rw-r--r-- | base/util_strsep.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 <string.h> + +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; +} + |