URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 148 |
Rev 158 |
/*
|
/*
|
FUNCTION
|
FUNCTION
|
<<rindex>>---reverse search for character in string
|
<<rindex>>---reverse search for character in string
|
|
|
INDEX
|
INDEX
|
rindex
|
rindex
|
|
|
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
#include <string.h>
|
#include <string.h>
|
char * rindex(const char *<[string]>, int <[c]>);
|
char * rindex(const char *<[string]>, int <[c]>);
|
|
|
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
#include <string.h>
|
#include <string.h>
|
char * rindex(<[string]>, <[c]>);
|
char * rindex(<[string]>, <[c]>);
|
char *<[string]>;
|
char *<[string]>;
|
int *<[c]>;
|
int *<[c]>;
|
|
|
DESCRIPTION
|
DESCRIPTION
|
This function finds the last occurence of <[c]> (converted to
|
This function finds the last occurence of <[c]> (converted to
|
a char) in the string pointed to by <[string]> (including the
|
a char) in the string pointed to by <[string]> (including the
|
terminating null character).
|
terminating null character).
|
|
|
This function is identical to <<strrchr>>.
|
This function is identical to <<strrchr>>.
|
|
|
RETURNS
|
RETURNS
|
Returns a pointer to the located character, or a null pointer
|
Returns a pointer to the located character, or a null pointer
|
if <[c]> does not occur in <[string]>.
|
if <[c]> does not occur in <[string]>.
|
|
|
PORTABILITY
|
PORTABILITY
|
<<rindex>> requires no supporting OS subroutines.
|
<<rindex>> requires no supporting OS subroutines.
|
|
|
QUICKREF
|
QUICKREF
|
rindex - pure
|
rindex - pure
|
*/
|
*/
|
|
|
#include <string.h>
|
#include <string.h>
|
|
|
char *
|
char *
|
_DEFUN (rindex, (s, c),
|
_DEFUN (rindex, (s, c),
|
_CONST char *s _AND
|
_CONST char *s _AND
|
int c)
|
int c)
|
{
|
{
|
return strrchr (s, c);
|
return strrchr (s, c);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.