libft_old/extended_libft/ft_putstr_fd.c
Willem Haffmans 326f52308e all
2024-07-26 22:32:04 +02:00

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);
}