Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
FDF/libft/ft_lstsize.c

27 lines
1.0 KiB
C
Raw Permalink Normal View History

2023-12-18 17:19:34 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/11 15:53:01 by adjoly #+# #+# */
/* Updated: 2023/11/11 15:59:03 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int i;
i = 0;
while (lst != NULL)
{
lst = lst->next;
i++;
}
return (i);
}