Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / rindex.c
blob39e5aa2dacf309f518694400c6df323b3c05ff0e
1 /*
2 FUNCTION
3 <<rindex>>---reverse search for character in string
5 INDEX
6 rindex
8 SYNOPSIS
9 #include <string.h>
10 char * rindex(const char *<[string]>, int <[c]>);
12 DESCRIPTION
13 This function finds the last occurence of <[c]> (converted to
14 a char) in the string pointed to by <[string]> (including the
15 terminating null character).
17 This function is identical to <<strrchr>>.
19 RETURNS
20 Returns a pointer to the located character, or a null pointer
21 if <[c]> does not occur in <[string]>.
23 PORTABILITY
24 <<rindex>> requires no supporting OS subroutines.
26 QUICKREF
27 rindex - pure
30 #include <string.h>
31 #include <strings.h>
33 char *
34 rindex (const char *s,
35 int c)
37 return strrchr (s, c);