#include "../libft.h" char *ft_strnew(int n, char c) { char *str; str = NULL; if (n < 0) return (NULL); str = malloc(n + 1); if (!str) return (NULL); str[n] = '\0'; while (--n >= 0) str[n] = c; return (str); }