-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr.c
34 lines (31 loc) · 1.06 KB
/
ft_putstr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aceauses <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/19 11:54:56 by aceauses #+# #+# */
/* Updated: 2023/04/23 22:00:53 by aceauses ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *c)
{
int i;
i = 0;
if (!c)
{
write(1, "(null)", 6);
i += 6;
}
else
{
while (c[i])
{
ft_putchar(c[i]);
i++;
}
}
return (i);
}