text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strdup.c                                        :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: tbeauman <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2015/11/23 14:08:51 by tbeauman          #+#    #+#             */
  /*   Updated: 2015/11/24 18:42:37 by tbeauman         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  char	*ft_strdup(const char *s1)
  {
  	char	*res;
  	int		i;
  
  	res = (char*)malloc((ft_strlen(s1) + 1) * sizeof(char));
  	if (!res)
  		return (NULL);
  	i = 0;
  	while (s1[i] != '\0')
  	{
  		res[i] = s1[i];
  		i++;
  	}
  	res[i] = '\0';
  	return (res);
  }
  