preotection trim et split

This commit is contained in:
Hugo LAMY
2019-12-09 22:03:22 +01:00
parent 418b9e3af6
commit 9fcfd1ba91
6 changed files with 43 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/11/25 14:01:26 by hulamy #+# #+# */
/* Updated: 2019/12/04 16:55:43 by hulamy ### ########.fr */
/* Updated: 2019/12/09 21:38:35 by hulamy ### ########.fr */
/* */
/* ************************************************************************** */
@@ -35,10 +35,19 @@
** char *s2;
** char *str;
**
** if (ac != 3)
** if (ac == 0)
** return (0);
** s1 = strdup(av[1]);
** s2 = strdup(av[2]);
** else if (ac == 3)
** {
** s1 = strdup(av[1]);
** s2 = strdup(av[2]);
** }
** else
** {
** s1 = malloc(sizeof(char*) * 100);
** s1 = "sdf";
** s2 = "tref";
** }
** str = ft_strjoin(s1, s2);
** printf("%s\n", str);
** return (0);