◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ──────────────────────────────────────────────────────────────────────────── The strcspn and strspn functions operate on null-terminated strings. The <string> arguments to these functions are expected to contain a null character (\0) marking the end of the string. No overflow checking is performed when strings are copied or appended. The strcspn function returns the index of the first character in <string1> belonging to the set of characters specified by <string2>. This value is equivalent to the length of the initial substring of <string1>, consisting entirely of characters not in <string2>. Terminating null characters are not considered in the search. If <string1> begins with a character from <string2>, strcspn returns 0. The strspn function returns the index of the first character in <string1> not belonging to the set of characters specified by <string2>. This value is equivalent to the length of the initial substring of <string1>, consisting entirely of characters from <string2>. The null character (\0) terminating <string2> is not considered in the matching process. If <string1> begins with a character not in <string2>, strspn returns 0. The _f... forms of these functions are model-independent (large- model) forms that use far pointer forms of the string arguments and return values. These model-independent functions can be called from any point in the program. Return Value The return values for these functions are described above. -♦-