23 lines
306 B
C
23 lines
306 B
C
/* @[$] strrchr.c 2.1 09/12/83 11:36:55 - 87wega3.2 */
|
|
|
|
/*
|
|
* Return the ptr in sp at which the character c last
|
|
* appears; NULL if not found
|
|
*/
|
|
|
|
#define NULL 0
|
|
|
|
char *
|
|
strrchr(sp, c)
|
|
register char *sp, c;
|
|
{
|
|
register char *r;
|
|
|
|
r = NULL;
|
|
do {
|
|
if (*sp == c)
|
|
r = sp;
|
|
} while (*sp++);
|
|
return(r);
|
|
}
|