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