change fonctions pour list avec nouvelles fonctions pour listes a deux sens
This commit is contained in:
24
srcs/ft_lstend.c
Normal file
24
srcs/ft_lstend.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstend.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: simplonco <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/03/24 15:11:41 by simplonco #+# #+# */
|
||||
/* Updated: 2022/03/24 15:12:17 by simplonco ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
/*
|
||||
* return a pointer to the last element of a two-way list
|
||||
*/
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
t_list *ft_lstend(t_list *lst)
|
||||
{
|
||||
while (lst->next)
|
||||
lst = lst->next;
|
||||
return (lst);
|
||||
}
|
||||
Reference in New Issue
Block a user