-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr_fd.c
33 lines (31 loc) · 1.18 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mgraf <mgraf@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/11 13:35:23 by mgraf #+# #+# */
/* Updated: 2022/12/11 13:39:08 by mgraf ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* Outputs the string 's' to the file descriptor 'fd'.
*
* @param s The string to output.
* @param fd The file descriptor to output to.
*
* @return None.
*/
void ft_putstr_fd(char *s, int fd)
{
if (fd != -1 && s != NULL)
{
while (*s)
{
ft_putchar_fd(*s, fd);
s++;
}
}
}