summaryrefslogtreecommitdiff
path: root/userland/libc/string/strpbrk.c
blob: fb16b0c4f4d1e89a639a72c412cc7fb659ba9a08 (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 s1;
      }
    }
  }
  return NULL;
}