text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memccpy.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: jaleman <jaleman@student.42.us.org>        +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2016/11/03 23:39:25 by jaleman           #+#    #+#             */
  /*   Updated: 2016/11/03 23:39:26 by jaleman          ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	*ft_memccpy(void *dst, const void *src, int c, size_t n)
  {
  	size_t			i;
  	unsigned char	*udst;
  	unsigned char	*usrc;
  
  	i = 0;
  	udst = (unsigned char *)dst;
  	usrc = (unsigned char*)src;
  	while (i < n)
  	{
  		udst[i] = usrc[i];
  		if (usrc[i] == (unsigned char)c)
  			return (&udst[i + 1]);
  		i += 1;
  	}
  	return (NULL);
  }
  