blob: 21d6507fb6d2c58e7f58119d6f560ca5c1e9f213 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <stddef.h>
char *strpbrk(const char *s1, const char *s2)
{
while (*s1 != '\0') {
const char *p = s2;
while (*p != '\0') {
if (*s1 == *p)
return (char *)s1;
p++;
}
s1++;
}
return NULL;
}
|