Table of Contents
Previous topic Next topic
C LIBRARY FUNCTIONS->Detailed Descriptions->strcspn()
|size_t strcspn(const char* string1, const char* string2);||Measure span of characters not in set|
|string1||String being scanned|
|string2||Character set string|
This function measures the number of characters in string1 preceding the first character which is also in string2. The null termination character is not included in the search.
Both string1 and string2 must be null terminated strings.
The length of the initial sub-string in string1 that consists entirely of characters not in string2. It string1 begins with a character in string2 then zero is returned.