123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include <string.h>
- char *strrchr (const char *s, int c)
- {
- register const char *found, *p;
- c = (unsigned char) c;
-
- if (c == '\0')
- return strchr (s, '\0');
- found = NULL;
- while ((p = strchr (s, c)) != NULL)
- {
- found = p;
- s = p + 1;
- }
- return (char *) found;
- }
- libc_hidden_weak(strrchr)
- #ifdef __UCLIBC_SUSV3_LEGACY__
- weak_alias(strrchr,rindex)
- #endif
|