From 4e2e8aac225f2a226573ae36e5327a8c4073bbbc Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 8 Oct 2019 18:19:36 +0200 Subject: Added bonus functions WIP --- ft_lstlast.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ft_lstlast.c (limited to 'ft_lstlast.c') diff --git a/ft_lstlast.c b/ft_lstlast.c new file mode 100644 index 0000000..7442937 --- /dev/null +++ b/ft_lstlast.c @@ -0,0 +1,11 @@ +#include +#include "libft.h" + +t_list *ft_lstlast(t_list *lst) +{ + if (lst == NULL) + return (NULL); + while (lst->next != NULL) + lst = lst->next; + return (lst); +} -- cgit