push_swap/libft/src/output/ft_putstr_fd.c
2024-11-04 13:11:17 +01:00

25 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: o_ :::::: ::: */
/* ft_putstr_fd.c :+: / :+::+: :+: */
/* +:+ > +:++:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
/* +#+ +#+#+ +#++#+ +#+ \o/ */
/* Created: 2024/10/10 17:00:26 by whaffman #+#+# #+#+# #+# #+# | */
/* Updated: 2024/10/10 17:00:26 by whaffman ### ### ### ### / \ */
/* */
/* ************************************************************************** */
#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);
}