strcmp(const char *str1, const char *str2)
{
int ch1, ch2, diff;
for(;;) {
ch1 = *str1++;
ch2 = *str2++;
diff = ch1 - ch2;
if (diff) {
return diff;
} else if (ch1=='\0') {
return 0;
}
}
}
strcmp
最新推荐文章于 2018-12-16 17:28:19 发布