Efficient STRing CoMPares?

Doug Gwyn gwyn at smoke.brl.mil
Tue Mar 19 12:02:11 AEST 1991


In article <1991Mar18.174207.7377 at bingvaxu.cc.binghamton.edu> consp06 at bingsuns.cc.binghamton.edu (Robert Konigsberg) writes:
>Wouldn't it be good then, to include in the macro, something to compare
>the actual POINTERS?  If the pointers are the same then the two strings
>have no CHOICE but to be equivelant.

Nice try, but in the vast majority of applications the strings being
compared, even in cases where they match, are contained in different
storage locations.  E.g.
	if ( StrEq( buffer, "EOF" ) ) ...



More information about the Comp.lang.c mailing list