home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
223_01
/
strrchr.c
< prev
next >
Wrap
Text File
|
1979-12-31
|
512b
|
17 lines
/*
** strrchr(s,c) - Search s for rightmost occurrance of c.
** s = Pointer to string to be searched.
** c = Character to search for.
** Returns pointer to rightmost c or NULL.
*/
static char *ptr;
strrchr(s, c) char *s, c; {
ptr = 0;
while(*s) {
if(*s==c) ptr = s;
++s;
}
return (ptr);
}