* atoi 使用
printf("atoi num:%d\n", atoi("12")); //12
printf("atoi num:%d\n", atoi("12xx")); //12
printf("atoi num:%d\n", atoi("xx12")); //0
printf("atof num:%f\n", atof("12.5")); //12.500000
printf("atof num:%f\n", atof("12.5xx")); //12.500000
printf("atof num:%f\n", atof("x12.5")); //0.000000
* strcmp 比较两个字符串(区分大小写), strncmp 比较两个字符串的前 n 个字符(区分大小写), strcasecmp 比较两个字符串(不区分大小写)
* strstr 用于查找子字符串首次出现位置的函数, 找不到时返回 NULL
char *strstr(const char *haystack, const char *needle);
char *str = "hello world";
char *text = "l";
char * ret = strstr(str,text);printf("ret:%s\n",ret); //输出 llo world
printf("ret:%s, position:%ld\n",ret,ret - str); // 输出 2