feat: added ft_putstr

This commit is contained in:
Zoëy Noort 2025-05-11 19:23:23 +02:00
parent 2a9b042122
commit 5276d36f0c

12
srcs/ft_putstr.c Normal file
View file

@ -0,0 +1,12 @@
#include "libft.h"
#include <unistd.h>
int ft_putstr(const char *s)
{
int len = 0;
if (!s)
return write(1, "(null)", 6);
while (s[len])
write(1, &s[len++], 1);
return len;
}