-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putendl_fd.c
27 lines (25 loc) · 1.03 KB
/
ft_putendl_fd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sbin-jef <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/28 15:17:47 by sbin-jef #+# #+# */
/* Updated: 2024/06/29 23:36:00 by sbin-jef ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
#include "libft.h"
void ft_putendl_fd(char *s, int fd)
{
if (s)
{
while (*s)
{
write(fd, s, 1);
s++;
}
write(fd, "\n", 1);
}
}