home *** CD-ROM | disk | FTP | other *** search
- /*
- ** 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);
- }