invalid maps
This commit is contained in:
27
Oglibft/libft/srcs/ft_strjoin.c
Normal file
27
Oglibft/libft/srcs/ft_strjoin.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strjoin.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/07 16:30:47 by tmaze #+# #+# */
|
||||
/* Updated: 2019/03/16 15:39:59 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
char *ft_strjoin(char const *s1, char const *s2)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
ret = NULL;
|
||||
if (s1 != NULL && s2 != NULL
|
||||
&& (ret = ft_strnew(ft_strlen(s1) + ft_strlen(s2))) != NULL)
|
||||
{
|
||||
ft_strcpy(ret, s1);
|
||||
ft_strcat(ret, s2);
|
||||
}
|
||||
return (ret);
|
||||
}
|
Reference in New Issue
Block a user