rindex.c 460 B

123456789101112131415161718192021
  1. /* Stub implementation of (obsolete) rindex(). */
  2. /*
  3. @deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
  4. Returns a pointer to the last occurrence of the character @var{c} in
  5. the string @var{s}, or @code{NULL} if not found. The use of @code{rindex} is
  6. deprecated in new programs in favor of @code{strrchr}.
  7. @end deftypefn
  8. */
  9. extern char *strrchr (const char *, int);
  10. char *
  11. rindex (const char *s, int c)
  12. {
  13. return strrchr (s, c);
  14. }