-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr.c
31 lines (28 loc) · 1.09 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: msodor <msodor@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/30 21:29:20 by msodor #+# #+# */
/* Updated: 2022/11/01 19:58:00 by msodor ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putstr(char *str, int *counter)
{
int i;
i = 0;
if (str == NULL)
{
write(1, "(null)", 6);
*counter += 6;
return ;
}
while (str[i])
{
ft_putchar(str[i], counter);
i++;
}
}