-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_dlstlen.c
28 lines (24 loc) · 1.07 KB
/
ft_dlstlen.c
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_dlstlen.c :+: :+: */
/* +:+ */
/* By: jaberkro <[email protected]> +#+ */
/* +#+ */
/* Created: 2022/02/28 12:07:02 by jaberkro #+# #+# */
/* Updated: 2022/04/14 12:26:57 by jaberkro ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_dlstlen(t_dlist *to_check)
{
int i;
i = 0;
while (to_check)
{
to_check = to_check->next;
i++;
}
return (i);
}
/* Count and return the length of a doubly linked list */