ack/modules/src/string/strcmp.c
1987-01-06 11:41:50 +00:00

13 lines
195 B
C

/* return negative, zero or positive value if
resp. s < t, s == t or s > t
*/
int
strcmp(s, t)
register char *s, *t;
{
while (*s == *t++)
if (*s++ == '\0')
return 0;
return *s - *--t;
}