-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_putstr_fd.c
32 lines (29 loc) · 1.22 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cjackows <cjackows@student.42wolfsburg. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/12 17:11:35 by cjackows #+# #+# */
/* Updated: 2022/06/16 17:32:07 by cjackows ### ########.fr */
/* */
/* ************************************************************************** */
#include "../inc/libft.h"
/**
* @brief Pass the string "s" to the given file descriptor.
*
* @param s String passed as parameter
* @param fd File descriptor
*/
void ft_putstr_fd(char *s, int fd)
{
if (s || fd >= 0)
write(fd, s, ft_strlen(s));
}
// int main ()
// {
// char str[] = "Hello World!\n";
// ft_putstr_fd(str, 1);
// return (0);
// }