I found a function which performs the same as strcmp
but I was unable to see where the comparison s1 == s2
is happening. I need help. Thanks.
int MyStrcmp (const char *s1, const char *s2)
{
int i;
for (i = 0; s1[i] != 0 && s2[i] != 0; i++)
{
if (s1[i] > s2[i])
return +1;
if (s1[i] < s2[i])
return -1;
}
if (s1[i] != 0)
return +1;
if (s2[i] != 0)
return -1;
return 0;
}