-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_lstjoin.c
27 lines (24 loc) · 1.08 KB
/
ft_lstjoin.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstjoin.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ylagtab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/11 12:01:56 by ylagtab #+# #+# */
/* Updated: 2020/02/27 22:34:08 by ylagtab ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_lstjoin(t_list *lst)
{
t_list *tmp;
char *res;
res = ft_strdup("");
while (lst)
{
res = ft_strjoin_free(res, (char *)lst->content, 1, 0);
lst = lst->next;
}
return (res);
}