s to the given fileft_putstr_fd + a newlines출력 후 줄바꿈void ft_putendl_fd(char *s, int fd);
s : The string to output.fd : The file descriptor on which to write.#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
if (!s || fd < 0)
return ;
write(fd, s, ft_strlen(s));
write(fd, "\n", 1);
}