index.c revision 1.3
1/* Stub implementation of (obsolete) index(). */ 2 3/* 4 5@deftypefn Supplemental char* index (char *@var{s}, int @var{c}) 6 7Returns a pointer to the first occurrence of the character @var{c} in 8the string @var{s}, or @code{NULL} if not found. The use of @code{index} is 9deprecated in new programs in favor of @code{strchr}. 10 11@end deftypefn 12 13*/ 14 15extern char * strchr(const char *, int); 16 17char * 18index (const char *s, int c) 19{ 20 return strchr (s, c); 21} 22