text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strsub.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: asansyzb <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2018/10/23 15:52:18 by asansyzb          #+#    #+#             */
  /*   Updated: 2018/10/23 15:52:54 by asansyzb         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  char	*ft_strsub(char const *s, unsigned int start, size_t len)
  {
  	char	*dest;
  	size_t	i;
  
  	if (!s || !(dest = ft_strnew(len)))
  		return ((void*)0);
  	i = 0;
  	while (i < len)
  	{
  		dest[i] = s[start + i];
  		i++;
  	}
  	return (dest);
  }
  