/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_putendl_fd.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: fgras-ca +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/15 13:33:49 by fgras-ca #+# #+# */ /* Updated: 2023/02/21 10:19:05 by fgras-ca ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_putendl_fd(char *s, int fd) { int i; i = 0; if (!s) return ; while (s[i]) { write(fd, &s[i], 1); i++; } write(fd, "\n", 1); }