27 lines
1 KiB
C
27 lines
1 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lst_len.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2016/12/04 19:13:25 by gtertysh #+# #+# */
|
||
|
/* Updated: 2017/03/24 20:06:06 by gtertysh ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
int ft_lst_len(t_list *lst)
|
||
|
{
|
||
|
int len;
|
||
|
|
||
|
len = 0;
|
||
|
while (lst)
|
||
|
{
|
||
|
lst = lst->next;
|
||
|
len++;
|
||
|
}
|
||
|
return (len);
|
||
|
}
|