mirror of
https://github.com/fluencelabs/musl
synced 2025-06-01 00:51:41 +00:00
13 lines
235 B
C
13 lines
235 B
C
#include <string.h>
|
|
#include "libc.h"
|
|
|
|
void *__memrchr(const void *m, int c, size_t n)
|
|
{
|
|
const unsigned char *s = m;
|
|
c = (unsigned char)c;
|
|
while (n--) if (s[n]==c) return (void *)(s+n);
|
|
return 0;
|
|
}
|
|
|
|
weak_alias(__memrchr, memrchr);
|