libftx/printf/ft_putstr_fd.c
Camille Chauvet 3256ce67f7 kekw
2022-12-22 17:57:19 +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: 2022/10/12 16:51:51 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr_fd(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);
}