text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strjoin.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: anicusan <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2016/12/28 17:39:09 by anicusan          #+#    #+#             */
  /*   Updated: 2017/02/24 15:07:12 by anicusan         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  static int			ft_strlenz(const char *s)
  {
  	int		i;
  
  	if (!s)
  		return (0);
  	i = 0;
  	while (*(s + i) != '\0')
  	{
  		i++;
  	}
  	return (i);
  }
  
  char				*ft_strjoin(char const *s1, char const *s2)
  {
  	char	*new;
  	int		i;
  	int		j;
  
  	if (!(new = (char*)malloc(ft_strlenz(s1) + ft_strlenz(s2) + 1)))
  		return (NULL);
  	i = 0;
  	while (s1[i])
  	{
  		new[i] = s1[i];
  		i++;
  	}
  	j = 0;
  	while (s2[j])
  		new[i++] = s2[j++];
  	new[i] = '\0';
  	return (new);
  }
  