-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
20 lines (19 loc) · 1.02 KB
/
ft_putstr_fd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: belkarto <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/13 10:29:41 by belkarto #+# #+# */
/* Updated: 2022/10/31 07:16:42 by belkarto ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_putstr_fd(char *s, int fd)
{
if (s == NULL)
return (write(1, "(null)", 6));
else
return (write(fd, s, ft_strlen(s)));
}