split_keep

This commit is contained in:
Nathan Lebrun
2025-01-21 12:02:30 +01:00
parent 2f97574a37
commit 281c8c0f63
4 changed files with 135 additions and 19 deletions

View File

@@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_split_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/21 11:31:30 by nalebrun #+# #+# */
/* Updated: 2025/01/21 11:31:30 by nalebrun ### ########.fr */
/* */
/* ************************************************************************** */
#include "../../libft.h"
int is_charset(char c, char *set)
@@ -26,3 +38,17 @@ void free_tab(char **tab)
}
free(tab);
}
char **free_all(char **tab, int count)
{
int i;
i = 0;
while (i < count)
{
free(tab[i]);
i++;
}
free(tab);
return (NULL);
}