Libft
42 Libft library documentation
Loading...
Searching...
No Matches
ft_putstr_fd.c File Reference
+ Include dependency graph for ft_putstr_fd.c:

Go to the source code of this file.

Functions

void ft_putstr_fd (char *s, int fd)
 Writes a string to a file descriptor.
 

Function Documentation

◆ ft_putstr_fd()

void ft_putstr_fd ( char *  s,
int  fd 
)

Writes a string to a file descriptor.

Does nothing when s is NULL.

Parameters
sString to write.
fdDestination file descriptor.

Definition at line 23 of file ft_putstr_fd.c.

24{
25 if (!s)
26 return ;
27 write(fd, s, ft_strlen(s));
28}
size_t ft_strlen(const char *str)
Returns the length of a null-terminated string.
Definition ft_strlen.c:21

References ft_strlen().

Referenced by ft_putendl_fd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: