42_cub3d/Libft/ft_putendl_fd.c
2024-10-09 03:35:09 +02:00

27 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: grobledo <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/20 23:36:08 by grobledo #+# #+# */
/* Updated: 2023/02/20 23:36:09 by grobledo ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
int i;
if (!s)
return ;
i = 0;
while (s[i])
{
write(fd, &s[i], 1);
i++;
}
ft_putchar_fd('\n', fd);
}