size_t strcspn(
	const char * __s,
	const char * __reject)

The strcspn() function calculates the length of the initial segment of s which consists entirely of characters not in reject.

Returns

The strcspn() function returns the number of characters in the initial segment of s which are not in the string reject. The terminating zero is not considered as a part of string.