26 lines
1,019 B
C
26 lines
1,019 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstsize.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/10/04 16:21:29 by mcolonna #+# #+# */
|
|
/* Updated: 2023/10/04 16:44:08 by mcolonna ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int ft_lstsize(t_list *lst)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (lst)
|
|
{
|
|
lst = lst->next;
|
|
i++;
|
|
}
|
|
return (i);
|
|
}
|