summaryrefslogtreecommitdiff
path: root/userland/libc/string/strpbrk.c
blob: 3bb058be05bc980c4a05c19c7eccee07861c47f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <string.h>

char *strpbrk(const char *s1, const char *s2) {
  for (; *s1; s1++) {
    for (const char *t = s2; *t; t++) {
      if (*s1 == *t) {
        return (char*)s1;
      }
    }
  }
  return NULL;
}