/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstsize.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: whaffman +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/05 18:42:06 by whaffman #+# #+# */ /* Updated: 2024/07/10 16:37:42 by whaffman ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_lstsize(t_list *lst) { int count; count = 1; if (!lst) return (0); while (lst->next) { lst = lst->next; count++; } return (count); }