-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
executable file
·24 lines (21 loc) · 1.03 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: chonorat <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/05 16:27:59 by chonorat #+# #+# */
/* Updated: 2022/12/27 16:15:03 by chonorat ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putstr_fd(char *s, int fd)
{
unsigned int index;
index = 0;
if (!s)
return ;
while (s[index])
write(fd, &s[index++], 1);
}