2024-04-24 10:53:46 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* ft_putstr_fd.c :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
2024-04-29 13:53:00 +02:00
|
|
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
2024-04-24 10:53:46 +02:00
|
|
|
/* +#+#+#+#+#+ +#+ */
|
2024-04-29 13:53:00 +02:00
|
|
|
/* Created: 2023/11/07 14:33:48 by mmoussou #+# #+# */
|
|
|
|
/* Updated: 2024/01/03 22:00:20 by mmoussou ### ########.fr */
|
2024-04-24 10:53:46 +02:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
2024-04-29 13:53:00 +02:00
|
|
|
#include "libft.h"
|
2024-04-24 10:53:46 +02:00
|
|
|
|
2024-04-29 13:53:00 +02:00
|
|
|
int ft_putstr_fd(char *s, int fd)
|
2024-04-24 10:53:46 +02:00
|
|
|
{
|
2024-04-29 13:53:00 +02:00
|
|
|
if (!s)
|
|
|
|
return (write(1, "(null)", 6));
|
|
|
|
return (write(fd, s, ft_strlen(s)));
|
2024-04-24 10:53:46 +02:00
|
|
|
}
|