text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memchr.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: ecerquei <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2020/01/21 23:05:31 by ecerquei          #+#    #+#             */
  /*   Updated: 2020/01/21 23:12:47 by ecerquei         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	*ft_memchr(const void *s, int c, size_t n)
  {
  	size_t			i;
  	unsigned char	*str;
  
  	str = (unsigned char*)s;
  	i = 0;
  	while (i < n)
  	{
  		if (str[i] == (unsigned char)c)
  			return (&str[i]);
  		i++;
  	}
  	return (NULL);
  }
  