标签:style ar sp log c r bs har 字符串
0:字符串中不包含字符c; >0 包含字符c.
int str_search(char *cstr,char c)
{
int irs = 0;
char *cp = cstr;
zlog_debug(fzs,"cp=%s",cp);
zlog_debug(fzs,"c=%c",c);
while(*cp != 0)
{
if(*cp==c)
{
irs++;
}
cp++;
}
cp = NULL;
return irs;
}
标签:style ar sp log c r bs har 字符串
原文地址:http://my.oschina.net/u/1865121/blog/316864