xref: /netbsd-src/external/gpl3/gdb/dist/libiberty/rindex.c (revision 98b9484c67cdf05a7e01fa6a65d1f4f959a3633e)
1*98b9484cSchristos /* Stub implementation of (obsolete) rindex(). */
2*98b9484cSchristos 
3*98b9484cSchristos /*
4*98b9484cSchristos 
5*98b9484cSchristos @deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
6*98b9484cSchristos 
7*98b9484cSchristos Returns a pointer to the last occurrence of the character @var{c} in
8*98b9484cSchristos the string @var{s}, or @code{NULL} if not found.  The use of @code{rindex} is
9*98b9484cSchristos deprecated in new programs in favor of @code{strrchr}.
10*98b9484cSchristos 
11*98b9484cSchristos @end deftypefn
12*98b9484cSchristos 
13*98b9484cSchristos */
14*98b9484cSchristos 
15*98b9484cSchristos extern char *strrchr (const char *, int);
16*98b9484cSchristos 
17*98b9484cSchristos char *
rindex(const char * s,int c)18*98b9484cSchristos rindex (const char *s, int c)
19*98b9484cSchristos {
20*98b9484cSchristos   return strrchr (s, c);
21*98b9484cSchristos }
22