text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strchr.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: mghazari <mghazari@student.42.fr>          +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2016/12/27 05:47:47 by mghazari          #+#    #+#             */
  /*   Updated: 2016/12/27 05:47:50 by mghazari         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  char	*ft_strchr(const char *s, int c)
  {
  	int		i;
  	char	*str;
  
  	i = 0;
  	str = (char *)s;
  	while (str[i])
  	{
  		if (str[i] == c)
  			return (str + i);
  		i++;
  	}
  	if (str[i] == c)
  		return (str + i);
  	return (NULL);
  }
  