-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
28 lines (25 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ytaya <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/20 14:22:57 by ytaya #+# #+# */
/* Updated: 2021/11/21 01:30:08 by ytaya ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *str)
{
int i;
i = 0;
if (!str)
{
i += ft_putstr("(null)");
return (i);
}
while (*str)
i += ft_putchar(*str++);
return (i);
}