Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
strrchr.c
Go to the documentation of this file.
1 // Imported from musl Libc
2 
3 #include <string.h>
4 
5 extern void* __memrchr(const void*, int, size_t);
6 
7 char* strrchr(const char* s, int c)
8 {
9  return __memrchr(s, c, strlen(s) + 1);
10 }
char * strrchr(const char *s, int c)
Finds the last occurrence of c in the null-terminated byte string pointed to by s.
Definition: strrchr.c:7
void * __memrchr(const void *, int, size_t)
Definition: memrchr.c:7
size_t strlen(const char *str)
Returns the length of the given null-terminated byte string.
Definition: strlen.c:77