memcpy.c 192 B

12345678910111213
  1. /* Public domain. */
  2. #include <stddef.h>
  3. void *
  4. memcpy (void *dest, const void *src, size_t len)
  5. {
  6. char *d = dest;
  7. const char *s = src;
  8. while (len--)
  9. *d++ = *s++;
  10. return dest;
  11. }