[comp.lang.c] Why comparing strings...

robert@cs.arizona.edu (Robert J. Drabek) (10/16/90)

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@cs.Arizona.EDU
Department of Computer Science              uunet!arizona!robert
The University of Arizona                   602 621 4326
Tucson, AZ  85721