strcmp

Yanek Martinson yanek at panix.uucp
Tue Jun 18 17:40:29 AEST 1991


For intcmp(a,b) why not just use a-b ? That will tell you if they are equal
and if not, which is greater.

For strcmp(s,t): while(*s++==*t++&&*s&&*t); return *s-*t;



More information about the Comp.lang.c mailing list