/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_lstsize.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:44:24 by rparodi #+# #+# */ /* Updated: 2024/10/31 17:53:11 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" /** * @brief Give the size of the chained list * * @param lst the chained list * @return the size of the list */ int ft_lstsize(t_list *lst) { int count; count = 0; while (lst != NULL) { lst = lst->next; count++; } return (count); }