size_t strspn(
	const char * __s,
	const char * __accept)

The strspn() function calculates the length of the initial segment of s which consists entirely of characters in accept.

Returns

The strspn() function returns the number of characters in the initial segment of s which consist only of characters from accept. The terminating zero is not considered as a part of string.