123456789101112131415161718192021222324 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strjoin.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2014/11/10 17:27:47 by mazimi #+# #+# */
- /* Updated: 2015/06/25 16:03:01 by mazimi ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- char *ft_strjoin(char const *s1, char const *s2)
- {
- char *str;
- if (s1 == NULL || s2 == NULL)
- return (NULL);
- str = ft_strnew(ft_strlen(s1) + ft_strlen(s2));
- ft_strcpy(str, s1);
- return (ft_strcat(str, s2));
- }
|