OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [string/] [rindex.c] - Blame information for rev 194

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
2
FUNCTION
3
        <<rindex>>---reverse search for character in string
4
 
5
INDEX
6
        rindex
7
 
8
ANSI_SYNOPSIS
9
        #include <string.h>
10
        char * rindex(const char *<[string]>, int <[c]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <string.h>
14
        char * rindex(<[string]>, <[c]>);
15
        char *<[string]>;
16
        int *<[c]>;
17
 
18
DESCRIPTION
19
        This function finds the last occurence of <[c]> (converted to
20
        a char) in the string pointed to by <[string]> (including the
21
        terminating null character).
22
 
23
        This function is identical to <<strrchr>>.
24
 
25
RETURNS
26
        Returns a pointer to the located character, or a null pointer
27
        if <[c]> does not occur in <[string]>.
28
 
29
PORTABILITY
30
<<rindex>> requires no supporting OS subroutines.
31
 
32
QUICKREF
33
        rindex - pure
34
*/
35
 
36
#include <string.h>
37
 
38
char *
39
_DEFUN (rindex, (s, c),
40
        _CONST char *s _AND
41
        int c)
42
{
43
  return strrchr (s, c);
44
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.