text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memcpy.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: bshang <bshang@student.21-school.ru>       +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2020/05/03 11:34:58 by bshang            #+#    #+#             */
  /*   Updated: 2020/05/22 19:37:13 by bshang           ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	*ft_memcpy(void *dest, const void *src, size_t n)
  {
  	unsigned char	*ptrd;
  	unsigned char	*ptrs;
  	size_t			i;
  
  	if (dest == NULL && src == NULL)
  		return (NULL);
  	ptrd = (unsigned char*)dest;
  	ptrs = (unsigned char*)src;
  	i = 0;
  	while (i < n)
  	{
  		ptrd[i] = ptrs[i];
  		i++;
  	}
  	dest = ptrd;
  	return (dest);
  }
  