standard.C.string.strspn

strspn is available since version 1.0.

Prototype:

string strspn(string string, string strCharSet)

Parameters

string
Null-terminated string to search
strCharSet
Null-terminated character set

Description:

Find the first substring. The strspn function returns the index of the first character in string that does not belong to the set of characters in strCharSet. The search does not include terminating null characters.

Return value:

strspn returns an integer value specifying the length of the substring in string that consists entirely of characters in strCharSet. If string begins with a character not in strCharSet, the function returns 0. No return value is reserved to indicate an error.