[OCLUG-devel] comparing strings

James Colannino james at colannino.org
Fri Sep 2 16:40:58 PDT 2005


Christopher Smith wrote:

>Assuming the string you are searching with doesn't have any carriage
>returns in it, why not just use strstr()? It'll return the first place
>in the larger string that has a match, and you assume all preceding ones
>aren't a match. You can then invoke it starting at the next address
>after the one returned by strstr(). Repeat until NULL.
>  
>

That should work pefectly.  Thanks.

James


More information about the OCLUG-devel mailing list