13 lines
179 B
C
13 lines
179 B
C
#include <string.h>
|
|
|
|
void *memcpy(void *dest, const void *src, size_t n)
|
|
{
|
|
const char *s = src;
|
|
char *d = dest;
|
|
|
|
for (size_t i = 0; i < n; i++)
|
|
*d++ = *s++;
|
|
|
|
return dest;
|
|
}
|