-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr_fd.c
29 lines (27 loc) · 1.25 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: flverge <flverge@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/02 15:21:37 by flverge #+# #+# */
/* Updated: 2024/09/22 17:23:36 by flverge ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Writes a string to the specified file descriptor.
*
* This function writes the string 's' to the file descriptor 'fd'.
* If the string is NULL, the function does nothing.
*
* @param s The string to be written.
* @param fd The file descriptor on which to write.
*/
void ft_putstr_fd(char *s, int fd)
{
if (!s)
return ;
write(fd, s, ft_strlen(s));
}