summaryrefslogtreecommitdiff
path: root/libc/string/strpbrk.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/strpbrk.c')
-rw-r--r--libc/string/strpbrk.c21
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;
+}