c/string/byte/strcspn

Returns the length of the maximum initial segment of the null-terminated byte string pointed to by, that consists of only the characters not found in the null-terminated byte string pointed to by.

The behavior is undefined if either or  is not a pointer to a null-terminated byte string.

Return value
The length of the maximum initial segment that contains only characters not found in the null-terminated byte string pointed to by