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