feat: added ft_putstr
This commit is contained in:
parent
2a9b042122
commit
5276d36f0c
1 changed files with 12 additions and 0 deletions
12
srcs/ft_putstr.c
Normal file
12
srcs/ft_putstr.c
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue