text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memmove.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: lprior <lprior@student.42.fr>              +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2017/09/21 17:07:31 by lprior            #+#    #+#             */
  /*   Updated: 2017/09/25 13:54:17 by lprior           ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	*ft_memmove(void *dst, const void *src, size_t len)
  {
  	size_t	i;
  
  	if (dst == src)
  		return (dst);
  	if (dst > src)
  	{
  		i = len;
  		while (i-- > 0)
  			((char *)dst)[i] = ((char *)src)[i];
  	}
  	else
  	{
  		i = 0;
  		while (i < len)
  		{
  			((char *)dst)[i] = ((char *)src)[i];
  			i++;
  		}
  	}
  	return (dst);
  }
  