25 lines
1.0 KiB
C
25 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_putstr_fd.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/07/05 18:42:08 by whaffman #+# #+# */
|
|
/* Updated: 2024/07/08 22:54:32 by whaffman ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include <unistd.h>
|
|
#include "libft.h"
|
|
|
|
void ft_putstr_fd(char *s, int fd)
|
|
{
|
|
size_t length;
|
|
|
|
if (s == NULL || fd < 0)
|
|
return ;
|
|
length = ft_strlen(s);
|
|
write(fd, s, length);
|
|
}
|