fxlibc/src/libc/string/strcspn.c

9 lines
144 B
C

#include <string.h>
size_t strcspn(char const *s, char const *reject)
{
size_t i = 0;
while(s[i] && !strchr(reject, s[i])) i++;
return i;
}