result of strstr(cs,ct) when ct is a null string
Todd Karakashian
todd at cfa.harvard.edu
Tue May 21 02:32:27 AEST 1991
Is the result of strstr(cs,ct) defined when ct is a null string
(i.e., when *ct == '\0')?
SunOS 4.1.1 strstr() returns cs in this situation. I checked the man
page, K&R 2, and the ANSI standard but couldn't find any illuminating
information (like, for example, saying it was undefined).
I am thinking perhaps that strstr() ought to return NULL in this case, or
maybe a pointer to the null termination of cs, but I am curious what
other people think.
Thanks...
Todd
########################################################################
## Todd Karakashian todd at cfa.harvard.edu (I-net)##
## Smithsonian Astrophysical Observatory ...harvard!cfa!todd (uucp) ##
## 60 Garden Street, MS 70 todd at cfa (BITNET) ##
## Cambridge, MA 02138 USA Phone: 617-495-7168 ##
########################################################################
--
########################################################################
## Todd Karakashian todd at cfa.harvard.edu (I-net)##
## Smithsonian Astrophysical Observatory ...harvard!cfa!todd (uucp) ##
## 60 Garden Street, MS 70 todd at cfa (BITNET) ##
More information about the Comp.lang.c
mailing list