-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr_fd.c
35 lines (33 loc) · 1.32 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
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jamendoe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/12 18:24:04 by jamendoe #+# #+# */
/* Updated: 2022/11/12 18:24:06 by jamendoe ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putstr_fd(char *s, int fd)
{
int i;
i = 0;
if (!s)
return ((void) NULL);
while (s[i])
i++;
write(fd, s, i);
}
/*
Function name ft_putstr_fd
Prototype void ft_putstr_fd(char *s, int fd);
Turn in files -
Parameters s: The string to output.
fd: The file descriptor on which to write.
Return value None
External functs. write
Description Outputs the string ’s’ to the given file
descriptor.
*/