mirror of
https://github.com/Ladebeze66/printf.git
synced 2025-12-15 13:46:49 +01:00
29 lines
1.0 KiB
C
Executable File
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);
|
|
}
|