| ** Copyright 1998-2002 University of Illinois Board of Trustees |
| ** Copyright 1998-2002 Mark D. Roth |
| ** strrstr.c - strrstr() function for compatibility library |
| ** Mark D. Roth <roth@uiuc.edu> |
| ** Campus Information Technologies and Educational Services |
| ** University of Illinois at Urbana-Champaign |
| ** find the last occurrance of find in string |
| strrstr(char *string, char *find) |
| size_t stringlen, findlen; |
| stringlen = strlen(string); |
| for (cp = string + stringlen - findlen; cp >= string; cp--) |
| if (strncmp(cp, find, findlen) == 0) |