text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strnstr.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: rburger <marvin@42.fr>                     +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2017/05/23 19:42:00 by rburger           #+#    #+#             */
  /*   Updated: 2017/05/26 21:25:59 by rburger          ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  char	*ft_strnstr(char *s1, char *s2, size_t len)
  {
  	int	i;
  
  	i = 0;
  	if (*s2 == '\0')
  		return ((char*)s1);
  	while (*s1 && len)
  	{
  		if (*s1 == s2[i])
  			i++;
  		else
  			i = 0;
  		if (s2[i] == '\0')
  			return ((char*)(s1 - i + 1));
  		s1++;
  		len--;
  	}
  	return (0);
  }
  