text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_memchr.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: kmethawa <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2022/03/16 01:13:25 by kmethawa          #+#    #+#             */
  /*   Updated: 2022/03/16 01:16:24 by kmethawa         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	*ft_memchr(const void *s, int c, size_t n)
  {
  	size_t	i;
  
  	i = 0;
  	while (i < n)
  	{
  		if (*(unsigned char *)s == (unsigned char)c)
  			return ((void *)s);
  		s++;
  		i++;
  	}
  	return (NULL);
  }
  