text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strncmp.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: slaanani <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2019/05/26 04:41:50 by slaanani          #+#    #+#             */
  /*   Updated: 2019/05/26 04:41:52 by slaanani         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  int		ft_strncmp(const char *s1, const char *s2, size_t n)
  {
  	size_t	i;
  
  	i = 0;
  	while (i <= ft_strlen(s1) && i < n)
  	{
  		if ((unsigned char)s1[i] != (unsigned char)s2[i])
  			return ((unsigned char)s1[i] - (unsigned char)s2[i]);
  		i++;
  	}
  	return (0);
  }
  