Re: [NEWBIE]StrStr question again

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 01/06/98

On Tue, 6 Jan 1998, - Pure Krome - wrote:

->    just another pathetic question about strstr. How can it be done to
->check for a substring (char *needle) in the haystack (char *haystack),
->where it will WILL return the char a pointer to the beginning of the
->substring in this case ...

One problem I've seen people have with strstr(): they tend to pass the
arguments in the order they're used to hearing them ("...finding a
needle in a haystack...").  It's "strstr(haystack, needle)".  That's
the only thing I can think that would make strstr() behave
incorrectly, assuming that you are passing two non-NULL strings.


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST