home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
C
/
SMALL_C
/
STRRCHR.C
< prev
next >
Wrap
Text File
|
1987-10-04
|
384b
|
16 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.
*/
strrchr(s, c) char *s, c; {
char *ptr;
ptr = 0;
while(*s) {
if(*s==c) ptr = s;
++s;
}
return (ptr);
}