26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_list_at.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/07/03 15:15:29 by whaffman #+# #+# */
|
|
/* Updated: 2024/07/03 17:46:26 by whaffman ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "ft_list.h"
|
|
|
|
t_list *ft_list_at(t_list *begin_list, unsigned int nbr)
|
|
{
|
|
while (nbr > 0)
|
|
{
|
|
begin_list = begin_list->next;
|
|
if (!begin_list)
|
|
return (NULL);
|
|
nbr--;
|
|
}
|
|
return (begin_list);
|
|
}
|