You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
198 B
15 lines
198 B
9 years ago
|
/* memcpy.c */
|
||
|
|
||
|
#include "types.h"
|
||
|
|
||
|
void *memcpy(void *str1, const void *str2, size_t n)
|
||
|
{
|
||
|
char *dest = str1;
|
||
|
const char *src = str2;
|
||
|
|
||
|
while (n--)
|
||
|
*dest++ = *src++;
|
||
|
|
||
|
return str1;
|
||
|
}
|