FENIX_libc/string/memcpy.c
2020-02-11 23:23:27 -06:00

12 lines
287 B
C
Executable file

#include <string.h>
void * memcpy(void * restrict dest, const void * restrict src, size_t size) {
unsigned char * to = (unsigned char *) dest;
const unsigned char * from = (const unsigned char *) src;
for(size_t i = 0; i < size; i++) {
to[i] = from[i];
}
return dest;
}