27 lines
1.0 KiB
C
27 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstsize.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/09/30 01:18:08 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/09/30 01:18:15 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
int ft_lstsize(t_list *lst)
|
||
|
{
|
||
|
int count;
|
||
|
|
||
|
count = 0;
|
||
|
while (lst != NULL)
|
||
|
{
|
||
|
count++;
|
||
|
lst = lst->next;
|
||
|
}
|
||
|
return (count);
|
||
|
}
|