C库函数 - strcspn() C库函数 - strncpy() C库函数 - strerror() C库函数 - strcspn() #include <stdio.h> #include <string.h> int main () { int len; const char str1[] = "ABCDEF4960910"; const char str2[] = "013"; len = strcspn(str1, str2); printf("First matched character is at %d\n", len + 1); return(0); } C库函数 - strncpy() C库函数 - strerror()