-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
28 lines (26 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
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mmaurer <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/09/04 22:13:28 by mmaurer #+# #+# */
/* Updated: 2021/09/05 17:56:42 by mmaurer ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
* Outputs the string ’s’ to the given filedescriptor.
*/
void ft_putstr_fd(char *s, int fd)
{
if (!s)
return ;
while (*s != '\0')
{
write(fd, s, 1);
s++;
}
return ;
}