mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-13 16:08:45 +02:00
「✨」 feat(libft): added a very cool feature !
This commit is contained in:
26
libft/lst/ft_lstsize.c
Normal file
26
libft/lst/ft_lstsize.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstsize.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/11 15:53:01 by adjoly #+# #+# */
|
||||
/* Updated: 2024/02/04 14:59:13 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../libft.h"
|
||||
|
||||
int ft_lstsize(t_list *lst)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (lst)
|
||||
{
|
||||
lst = lst->next;
|
||||
i++;
|
||||
}
|
||||
return (i);
|
||||
}
|
Reference in New Issue
Block a user