42_minishell/libftx/printf/ft_putstr_fd.c
2023-02-17 16:33:52 +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/17 16:28:25 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_p(fd, str[i++]);
return (i);
}