You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
24 lines
1.0 KiB
3 years ago
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstsize.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2021/10/22 14:49:32 by narnaud #+# #+# */
|
||
|
/* Updated: 2022/03/24 11:31:05 by narnaud ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "../libft.h"
|
||
|
|
||
|
int ft_slst_size(t_slist *lst)
|
||
|
{
|
||
|
size_t lst_size;
|
||
|
|
||
|
lst_size = 0;
|
||
|
while (lst && ++lst_size)
|
||
|
lst = lst->next;
|
||
|
return (lst_size);
|
||
|
}
|