text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strjoin.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: dbanfi <dbanfi@student.42.fr>              +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2022/02/26 16:50:51 by dbanfi            #+#    #+#             */
  /*   Updated: 2022/02/26 16:50:51 by dbanfi           ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  /*
  DESCRIPTION
  	Allocates (with malloc(3)) and returns a new string, which is the result
  	of the concatenation of ’s1’ and ’s2’.
  RETURN VALUE
  	The new string. NULL if the allocation fails.
  */
  
  #include "libft.h"
  
  char	*ft_strjoin(char const *s1, char const *s2)
  {
  	char	*return_s;
  
  	if (!s1 || !s2)
  		return (NULL);
  	return_s = malloc(sizeof(char) * (ft_strlen(s1) + ft_strlen(s2)) + 1);
  	if (return_s == NULL)
  		return (NULL);
  	ft_memcpy(return_s, s1, ft_strlen(s1));
  	ft_memcpy(return_s + ft_strlen(s1), s2, ft_strlen(s2));
  	return_s[(ft_strlen(s1) + ft_strlen(s2))] = '\0';
  	return (return_s);
  }
  