size_t strcspn ( const char * string1, const char * string2 );
Search string for occurrence of character set.
Scans string1 character by character, returning the number of characters read until the first occurrence of any character included in string2.
The search includes terminating null-characters, so the function will return the length of string1 if none of the characters included in string2 is in string1.
Returns the position in string1 of the first occurence of a component character of string2.
Defined in ANSI-C.
/* strcspn example */
char str1 = "fcba73";
char str2 = "1234567890";
i = strcspn (str1,str2);
printf ("The first number in str1 is str1[%d]\n",i);
The first number in str1 is str1
strspn, strstr, strncmp