debut du parsing :(
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strjoin.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/07/24 18:06:14 by tomoron #+# #+# */
|
||||
/* Updated: 2023/11/02 10:26:09 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/07/24 18:06:14 by tomoron #+# #+# */
|
||||
/* Updated: 2024/02/03 22:47:27 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
@ -61,3 +61,15 @@ char *ft_strjoin(char const *s1, char const *s2)
|
||||
res[j] = 0;
|
||||
return (res);
|
||||
}
|
||||
|
||||
char *ft_strjoin_free(char *s1, char *s2, int free_flags)
|
||||
{
|
||||
char *res;
|
||||
|
||||
res = ft_strjoin(s1, s2);
|
||||
if (free_flags == 1 || free_flags == 3)
|
||||
free(s1);
|
||||
if (free_flags == 2 || free_flags == 3)
|
||||
free(s2);
|
||||
return (res);
|
||||
}
|
||||
|
Reference in New Issue
Block a user