C Programming/string.h/strcspn

strcspn is the function from the C standard library (header file string.h).

It searches the string for certain set of characters.

The strcspn function calculates the length of initial segment of string 1 which does not contain any character from string 2.

Return Value
This function returns the index of first character in string 1 that matches with any character of string2.

Example
Output:

The first decimal digit of s is at position: 10