mirror of
https://github.com/Ladebeze66/libft.git
synced 2025-12-13 04:36:55 +01:00
29 lines
1.0 KiB
C
Executable File
29 lines
1.0 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_putendl_fd.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* 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);
|
|
}
|