text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memchr.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: bledda <bledda@student.42nice.fr>          +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2021/03/23 11:14:59 by bledda            #+#    #+#             */
  /*   Updated: 2021/06/05 05:52:08 by bledda           ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "../header/libft.h"
  
  void	*ft_memchr(const void *s, int c, size_t n)
  {
  	size_t	i;
  
  	i = -1;
  	while (++i < n)
  		if (((char *)s)[i] == (char)c)
  			return ((char *)s + i);
  	return (0);
  }
  