text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memccpy.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: marvin <marvin@student.42.fr>              +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2020/04/03 12:39:03 by marvin            #+#    #+#             */
  /*   Updated: 2020/06/30 19:29:07 by marvin           ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include <string.h>
  #include "libft.h"
  
  void	*ft_memccpy(void *dest, const void *src, int c, size_t n)
  {
  	unsigned char	*source;
  	unsigned char	*destination;
  	size_t			i;
  
  	source = (unsigned char *)src;
  	destination = (unsigned char *)dest;
  	i = 0;
  	while (i < n)
  	{
  		destination[i] = source[i];
  		if (source[i] == (unsigned char)c)
  			return (dest + i + 1);
  		i++;
  	}
  	return (NULL);
  }
  