42_libft/main.c
Camille Chauvet be438f7dec v2
2022-10-04 14:21:55 +02:00

31 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 13:56:50 by cchauvet #+# #+# */
/* Updated: 2022/10/04 13:57:56 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include "libft.h"
int main(int argc, char **argv)
{
char **splitted;
if (argc < 2)
return (1);
splitted = ft_split(argv[1], argv[2][0]);
while (*splitted != NULL)
{
puts(*splitted);
free(*splitted);
splitted++;
}
return (0);
}