strcspn---count chars not in string
size_t strcspn(const char *s1, const char *s2);
This function computes the length of the initial part of the string pointed to by s1 which consists entirely of characters NOT from the string pointed to by s2 (excluding the terminating null character).
strcspn returns the length of the substring found.
strcspn is ANSI C.
strcspn requires no supporting OS subroutines.
Go to the first, previous, next, last section, table of contents.