69,371
社区成员
发帖
与我相关
我的任务
分享
int
strcmp(const char *s1, const char *s2)
{
while (*s1 == *s2++)
if (*s1++ == '\0')
return (0);
return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1));
}
greater than, equal to, or
less than zero
, according as the string pointed to by s1 is greater