libft
Loading...
Searching...
No Matches
ft_lstsize.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_lstsize_bonus.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tspoof <tspoof@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2022/11/06 19:04:20 by tspoof #+# #+# */
9/* Updated: 2022/11/06 19:15:05 by tspoof ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
16{
17 int i;
18 t_list *tmp;
19
20 i = 0;
21 tmp = lst;
22 while (tmp)
23 {
24 i++;
25 tmp = tmp->next;
26 }
27 return (i);
28}
int ft_lstsize(t_list *lst)
Size of a list.
Definition ft_lstsize.c:15
Definition libft.h:22
struct s_list * next
Definition libft.h:24