How to test whether strstr() returns a null pointer or not?
- From: John Smith <jsmith@xxxxxxxxxxx>
- Date: Sat, 04 Jun 2005 02:56:05 GMT
How to test whether strstr() returns a null pointer or not? Do I
use something like the following?
if(NULL != strstr(str1,str2))
That does not seem to work.
.
- Follow-Ups:
- Re: How to test whether strstr() returns a null pointer or not?
- From: Emmanuel Delahaye
- Re: How to test whether strstr() returns a null pointer or not?
- From: Barry Schwarz
- Re: How to test whether strstr() returns a null pointer or not?
- From: SM Ryan
- Re: How to test whether strstr() returns a null pointer or not?
- Prev by Date: Re: max size for printf() format conversion?
- Next by Date: Re: Help needed in dereferencing a union
- Previous by thread: Robustify code dealing with input
- Next by thread: Re: How to test whether strstr() returns a null pointer or not?
- Index(es):