* include/ext/array_allocator.h: Replace uses of
[official-gcc.git] / libiberty / index.c
blobacd0a45fc0295bcafd7baf3f114ff9a4f8a8761f
1 /* Stub implementation of (obsolete) index(). */
3 /*
5 @deftypefn Supplemental char* index (char *@var{s}, int @var{c})
7 Returns a pointer to the first occurrence of the character @var{c} in
8 the string @var{s}, or @code{NULL} if not found. The use of @code{index} is
9 deprecated in new programs in favor of @code{strchr}.
11 @end deftypefn
15 extern char * strchr(const char *, int);
17 char *
18 index (const char *s, int c)
20 return strchr (s, c);