PatchworkOS
Loading...
Searching...
No Matches
strpbrk.c
Go to the documentation of this file.
1#include <string.h>
2
3char* strpbrk(const char* s1, const char* s2)
4{
5 const char* p1 = s1;
6 const char* p2;
7
8 while (*p1)
9 {
10 p2 = s2;
11
12 while (*p2)
13 {
14 if (*p1 == *p2++)
15 {
16 return (char*)p1;
17 }
18 }
19
20 ++p1;
21 }
22
23 return NULL;
24}
#define NULL
Pointer error value.
Definition NULL.h:23
char * strpbrk(const char *s1, const char *s2)
Definition strpbrk.c:3