作用:返回字符串中首次出现字符’c’的位置,若无返回null
实现:
char* strchr(char *s, char c)
{
while (*s != ‘\0’ && *s != c)
{
++s;
}
return *s == c ? s : NULL;
}
头文件 include
strchr()的用法
猜你喜欢
转载自blog.csdn.net/ssf_cxdm/article/details/78377468
今日推荐
周排行