text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strdup.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: njacobso <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2018/11/19 18:14:00 by njacobso          #+#    #+#             */
  /*   Updated: 2018/11/21 15:09:49 by njacobso         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include <stdlib.h>
  #include "libft.h"
  
  char			*ft_strdup(const char *src)
  {
  	char	*str;
  	int		len;
  	int		i;
  
  	len = ft_strlen(src);
  	str = (char*)malloc(sizeof(char) * len + 1);
  	if (str == NULL)
  		return (NULL);
  	i = -1;
  	while (src[++i])
  		str[i] = src[i];
  	str[i] = '\0';
  	return (str);
  }
  