memrchr.c\string\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/memrchr.c
blob: e51748b805654c2fc0879be6829cfd38fe737cda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <string.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);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月06日 19:52:53 +0000

AltStyle によって変換されたページ (->オリジナル) /