-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putendl_fd.c
25 lines (22 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ylagtab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/04/03 23:41:19 by ylagtab #+# #+# */
/* Updated: 2020/10/15 08:34:38 by ylagtab ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_putendl_fd(char const *s, int fd)
{
int size;
if (s == NULL)
return (0);
size = ft_strlen(s);
ft_write_buff((char *)s, size, fd);
ft_write_buff("\n", 1, fd);
return (size + 1);
}