/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_charjoin.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/07/23 03:06:18 by bchanot #+# #+# */ /* Updated: 2018/10/13 19:51:19 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" #include char *ft_charjoin(const char *src, const char c) { char *s; if (!src || !c) return (NULL); if (!(s = ft_strnew(ft_strlen(src) + 1))) return (NULL); s = ft_strcpy(s, src); *(s + ft_strlen(s)) = c; return (s); }