/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_split.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: nlauvray i) { k = i; tab[j] = malloc(sizeof(**tab) * (i - k + ft_strstr(&str[i], sep) + 1)); while (i < k + ft_strstr(&str[k], sep)) { tab[j][i - k] = str[i]; i++; } tab[j][i - k] = '\0'; i = k + ft_strstr(&str[k], sep) + ft_strlen(sep); j++; } tab[j] = malloc(sizeof(char)); tab[j] = ""; return (tab); }