/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strjoin.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2015/11/26 20:09:15 by bchanot #+# #+# */ /* Updated: 2018/10/29 12:20:21 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include char *ft_strjoin(const char *s1, const char *s2) { char *s; if (!s1 || !s2) return (NULL); if (!(s = ft_strnew(ft_strlen(s1) + ft_strlen(s2)))) return (NULL); s = ft_strcpy(s, s1); s = ft_strcat(s, s2); return (s); }