]>
Commit | Line | Data |
---|---|---|
28e9041c | 1 | /* Stub implementation of (obsolete) index(). */ |
2 | ||
614a23c6 | 3 | /* |
4 | ||
5 | @deftypefn Supplemental char* index (char *@var{s}, int @var{c}) | |
6 | ||
997fdf4a | 7 | Returns a pointer to the first occurrence of the character @var{c} in |
a3a8a3df | 8 | the string @var{s}, or @code{NULL} if not found. The use of @code{index} is |
614a23c6 | 9 | deprecated in new programs in favor of @code{strchr}. |
10 | ||
11 | @end deftypefn | |
12 | ||
13 | */ | |
14 | ||
8858115e | 15 | extern char * strchr(const char *, int); |
28e9041c | 16 | |
17 | char * | |
8e1547da | 18 | index (const char *s, int c) |
28e9041c | 19 | { |
20 | return strchr (s, c); | |
21 | } |