-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putendl_fd.c
33 lines (31 loc) · 1.19 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
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putendl_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rodrodri <[email protected] > +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/27 00:38:52 by rodrodri #+# #+# */
/* Updated: 2021/11/14 22:14:33 by rodrodri ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putendl_fd(char const *s, int fd)
{
if (!s)
return ;
ft_putstr_fd(s, fd);
ft_putchar_fd('\n', fd);
}
/*
** Check this smarty-pants way:
**{
** char *snl;
**
** snl = ft_strnew(ft_strlen(s) + 1);
** ft_strcpy(snl, s);
** ft_strcat(snl, "\n");
** ft_putstr_fd(snl, fd);
** ft_strdel(&snl);
**}
*/