-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_putnendl.c
24 lines (21 loc) · 1.06 KB
/
ft_putnendl.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnendl.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vbrazas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/03/02 20:34:27 by vbrazas #+# #+# */
/* Updated: 2018/03/02 20:41:09 by vbrazas ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
ssize_t ft_putnendl(char const *s, size_t len)
{
ssize_t endlen;
if (!s)
return (0);
endlen = write(1, s, len);
endlen += write(1, "\n", 1);
return (endlen);
}