Why comparing strings...
Robert J. Drabek
robert at cs.arizona.edu
Tue Oct 16 10:00:35 AEST 1990
John Gordon writes:
> I will agree, strcmp() is fine. However, the original poster said
> that they wanted SOURCE, so I wrote the routine.
We don't really know why the original question was posed, and I would
venture the reason was somebody couldn't bother with ...
But having a reasonably-good C source is useful for those situations in
which strcmp is not quite what you want. You may want to fold upper and
lower case letters. Maybe skip over white space. Maybe only match the
first string with the leading substring of the second. And so forth.
So having a basic source which you can modify for your particular
application is handy.
--
Robert J. Drabek robert at cs.Arizona.EDU
Department of Computer Science uunet!arizona!robert
The University of Arizona 602 621 4326
Tucson, AZ 85721
More information about the Comp.lang.c
mailing list