Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!snorkelwacker.mit.edu!hsdndev!cfa203!todd From: todd@cfa.harvard.edu (Todd Karakashian) Newsgroups: comp.lang.c Subject: result of strstr(cs,ct) when ct is a null string Message-ID: <1991May20.163227.7166@cfa.harvard.edu> Date: 20 May 91 16:32:27 GMT Organization: Harvard-Smithsonian Center for Astrophysics, Cambridge, MA, USA Lines: 29 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@cfa.harvard.edu (I-net)## ## Smithsonian Astrophysical Observatory ...harvard!cfa!todd (uucp) ## ## 60 Garden Street, MS 70 todd@cfa (BITNET) ## ## Cambridge, MA 02138 USA Phone: 617-495-7168 ## ######################################################################## -- ######################################################################## ## Todd Karakashian todd@cfa.harvard.edu (I-net)## ## Smithsonian Astrophysical Observatory ...harvard!cfa!todd (uucp) ## ## 60 Garden Street, MS 70 todd@cfa (BITNET) ##