-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_lstsize.c
More file actions
28 lines (25 loc) · 1.02 KB
/
ft_lstsize.c
File metadata and controls
28 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstsize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: peduardo < peduardo@student.42sp.org.br +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/22 11:59:12 by peduardo #+# #+# */
/* Updated: 2021/08/22 13:20:16 by peduardo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_lstsize(t_list *lst)
{
int i;
i = 0;
if (!lst)
return (0);
while (lst)
{
lst = lst ->next;
i++;
}
return (i);
}