Advertisement
Guest User

ft_memmove

a guest
Nov 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. void    *ft_memmove(void *dst, const void *src, size_t n)
  2. {
  3.     void    *ret;
  4.  
  5.     ret = dst;
  6.     if (dst < src)
  7.         ft_memcpy(dst, src, n);
  8.     else
  9.         while (n-- > 0)
  10.             ((unsigned char *)dst)[n] = ((unsigned char *)src)[n];
  11.     return (ret);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement