summaryrefslogtreecommitdiff
path: root/lib/strpbrk.c
blob: 557c1a57b526f4eb8fd8c915444822f46c67f264 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stddef.h>

/* Shamefully copied from glibc 2.2.3 */
char *_xine_private_strpbrk(const char *s, const char *accept) {

  while(*s != '\0') {
    const char *a = accept;
    while(*a != '\0')
      if(*a++ == *s)
        return(char *) s;
    ++s;
  }

  return NULL;
}