]> pd.if.org Git - zos/blob - klib/strcspn.c
klib and makefile
[zos] / klib / strcspn.c
1 #include <string.h>
2
3 size_t strcspn(const char *s1, const char *s2) {
4         size_t len = 0;
5         const char *p;
6
7         while (s1[len]) {
8                 p = s2;
9                 while (*p) {
10                         if (s1[len] == *p++) {
11                                 return len;
12                         }
13                 }
14                 ++len;
15         }
16         return len;
17 }