In the C Programming Language, the strcspn function searches inside the string pointed to by way of s1 for the string pointed to by s2. It returns the index of the first character that is in the set.
The syntax for the strcspn characteristic in the C Language is:
size_t strcspn(const char *s1, const char *s2);
Parameters or Arguments
s1 A string to search within. s2 The string that you want to find.
The strcspn characteristic returns the index of the first persona that is in the set.
In the C Language, the required header for the strcspn function is:
In the C Language, the strcspn characteristic can be used in the following versions:
Other C features that are noteworthy when dealing with the strcspn function:
strspn function <string.h>