summaryrefslogtreecommitdiff
path: root/lib/strpbrk.c
blob: 34c47fc489e9df6655cb92a0c4c0fb90da437d5b (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;
}