42_cube3D/libftx/printf/ft_putstr_fd.c

26 lines
1.1 KiB
C
Raw Normal View History

2023-04-26 07:02:44 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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);
}