Search string for occurrence of character set: how to use strcspn
#include <stdio.h>
#include <string.h>
int main ()
{
char str1[] = "1245789000";
char str2[] = "1234567890";
int i;
i = strcspn (str1,str2);
printf ("The first number in str1 is str1[%d]\n", i);
return 0;
}