Push libft
125/100 corrected the 14/11/23
This commit is contained in:
commit
7bd66aee5b
45 changed files with 1462 additions and 0 deletions
22
ft_lstlast.c
Normal file
22
ft_lstlast.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstlast.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/12 17:25:48 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
t_list *ft_lstlast(t_list *lst)
|
||||
{
|
||||
if (lst == NULL)
|
||||
return (lst);
|
||||
while (lst->next != NULL)
|
||||
lst = lst->next;
|
||||
return (lst);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue