printf/libftprintf/ft_putstr_pf.c
2023-12-12 17:40:08 +01:00

29 lines
1.0 KiB
C
Executable File

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_pf.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/17 18:08:18 by fgras-ca #+# #+# */
/* Updated: 2023/03/18 17:49:52 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
#include "../ft_printf.h"
int ft_putstr_pf(char *s)
{
int i;
i = 0;
if (!s)
return (write(1, "(null)", 6));
while (s[i])
{
write(1, &s[i], 1);
i++;
}
return (i);
}