Efficient STRing CoMPares?

Robert Konigsberg consp06 at bingsuns.cc.binghamton.edu
Wed Mar 20 08:24:10 AEST 1991


In article <15510 at smoke.brl.mil>, gwyn at smoke.brl.mil (Doug Gwyn) writes:
|> 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" ) ) ...

Yeah, I figured. I just thought I'd give it a try.

			-Rob Konigsberg



More information about the Comp.lang.c mailing list