diff options
| author | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:16:35 +0000 | 
|---|---|---|
| committer | Erik Andersen <andersen@codepoet.org> | 2000-05-14 04:16:35 +0000 | 
| commit | 64bc6412188b141c010ac3b8e813b837dd991e80 (patch) | |
| tree | ffa12b79ea4b13191754f54b872eb1a4f9e3a04b /libc/string/strpbrk.c | |
| download | uClibc-alpine-64bc6412188b141c010ac3b8e813b837dd991e80.tar.bz2 uClibc-alpine-64bc6412188b141c010ac3b8e813b837dd991e80.tar.xz  | |
Initial revision0_9_1
Diffstat (limited to 'libc/string/strpbrk.c')
| -rw-r--r-- | libc/string/strpbrk.c | 21 | 
1 files changed, 21 insertions, 0 deletions
diff --git a/libc/string/strpbrk.c b/libc/string/strpbrk.c new file mode 100644 index 000000000..3fc27ec70 --- /dev/null +++ b/libc/string/strpbrk.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk> + * This file is part of the Linux-8086 C library and is distributed + * under the GNU Library General Public License. + */ + +#include <string.h> + +/* This uses strchr, strchr should be in assembler */ + +char *strpbrk(str, set) +register char *str; +char *set; +{ +  while (*str != '\0') +    if (strchr(set, *str) == 0) +      ++str; +    else +      return (char *) str; + +  return 0; +}  | 
