WvStreams
|
00001 /* strchrnul.c 00002 * 00003 */ 00004 00005 /* Written by Niels Möller <nisse@lysator.liu.se> 00006 * 00007 * This file is hereby placed in the public domain. 00008 */ 00009 00010 /* FIXME: What is this function supposed to do? My guess is that it is 00011 * like strchr, but returns a pointer to the NUL character, not a NULL 00012 * pointer, if the character isn't found. */ 00013 00014 char *strchrnul(const char *s, int c) 00015 { 00016 const char *p = s; 00017 while (*p && (*p != c)) 00018 p++; 00019 00020 return (char *) p; 00021 }