-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
34 lines (30 loc) · 1.12 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
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sde-silv <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/09 11:40:04 by sde-silv #+# #+# */
/* Updated: 2023/06/12 15:02:53 by sde-silv ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
void ft_putstr_fd(char *s, int fd);
int main(void)
{
ft_putstr_fd("Hello World!", 1);
return (0);
}
*/
void ft_putstr_fd(char *s, int fd)
{
int len;
len = 0;
if (s)
{
len = gnl_ft_strlen(s);
write (fd, s, len);
}
}