text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strjoin.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: Kwillum <daniilxod@gmail.com>              +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2020/05/05 01:39:52 by Kwillum           #+#    #+#             */
  /*   Updated: 2020/05/06 01:57:27 by Kwillum          ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  char	*ft_strjoin(char const *s1, char const *s2)
  {
  	size_t	len;
  	char	*p;
  	char	*start;
  
  	if (!s1 || !s2)
  		return (NULL);
  	len = ft_strlen(s2) + ft_strlen(s1);
  	p = (char *)malloc(sizeof(char) * (len + 1));
  	if (!p)
  		return (NULL);
  	start = p;
  	while (len-- && *s1)
  		*p++ = *s1++;
  	len++;
  	while (len-- && *s2)
  		*p++ = *s2++;
  	*p = '\0';
  	return (start);
  }
  