42_minishell/libftx/printf/ft_putstr_fd.c
Camille Chauvet 67fb6d0533 -m
2023-02-14 07:26:18 +01:00

26 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/29 22:25:08 by cchauvet #+# #+# */
/* Updated: 2023/02/03 12:49:18 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr_fd_p(int fd, char *str)
{
int i;
if (str == NULL)
str = "(null)";
i = 0;
while (str[i] != '\0')
ft_putchar_fd(fd, str[i++]);
return (i);
}