-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr_fd.c
25 lines (21 loc) · 1.07 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
21
22
23
24
25
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_putstr_fd.c :+: :+: */
/* +:+ */
/* By: kgajadie <[email protected]> +#+ */
/* +#+ */
/* Created: 2020/11/22 12:41:13 by kgajadie #+# #+# */
/* Updated: 2021/03/04 20:27:24 by kawish ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
/* Outputs the string ’s’ to the given filedescriptor */
void ft_putstr_fd(char *s, int fd)
{
size_t s_len;
if (!s)
return ;
s_len = ft_strlen(s);
write(fd, s, s_len);
}