-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_putstr.c
27 lines (24 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rel-fila <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/08 16:57:25 by rel-fila #+# #+# */
/* Updated: 2022/11/08 16:57:56 by rel-fila ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putstr(const char *str, int *count)
{
int i;
if (!str)
*count += write(1, "(null)", 6);
else
{
i = 0;
while (str[i])
ft_putchar(str[i++], count);
}
}