Files
rosetta/lib/libc/core/string/memset.c
Max Wash 68714fa0e5 lib: c: combine libc and ulibc
libc is now made up of several independent components, each of which is individually compiled into a static library.
they are then all combined into a single shared library.
2026-03-06 20:12:58 +00:00

14 lines
200 B
C

#include <stddef.h>
void *memset(void *str, int c, size_t n)
{
unsigned char val = (unsigned char)c;
unsigned char *buf = str;
for (size_t i = 0; i < n; i++) {
buf[i] = val;
}
return str;
}