summaryrefslogtreecommitdiff
path: root/libc/string/strpbrk.c
blob: 7e6b1a4a2836423e6ad66bba4c2f407353a86548 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 const char *str;
const char *set;
{
  while (*str != '\0')
    if (strchr(set, *str) == 0)
      ++str;
    else
      return (char *) str;

  return 0;
}