/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_substr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet len) max = len; if (start >= ft_strlen(s)) return (ft_strdup("")); sub = malloc((max + 1) * sizeof(char)); if (sub == NULL) return (NULL); sub[max] = 0; while (max-- > 0) sub[max] = s[max + start]; return (sub); }