feat: added lst structure
This commit is contained in:
parent
f3377656e4
commit
3287cd402f
6 changed files with 93 additions and 0 deletions
12
srcs/lst/ft_lstsize.c
Normal file
12
srcs/lst/ft_lstsize.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include "libft.h"
|
||||
|
||||
int ft_lstsize(t_list *lst)
|
||||
{
|
||||
int size = 0;
|
||||
while (lst)
|
||||
{
|
||||
size++;
|
||||
lst = lst->next;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue