libft/list/ft_lstsize.c
Raphael 3cadabea0a
docs(list): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:29 +02:00

27 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/12 11:44:24 by rparodi #+# #+# */
/* Updated: 2025/09/05 16:14:04 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "list.h"
#include <unistd.h>
int ft_lstsize(t_list *lst)
{
int count;
count = 0;
while (lst != NULL)
{
lst = lst->next;
count++;
}
return (count);
}