-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
33 lines (30 loc) · 1.07 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: waraissi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/09 18:41:53 by waraissi #+# #+# */
/* Updated: 2022/11/10 18:16:45 by waraissi ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putstr(char *s, int *res)
{
int i;
i = 0;
if (!s)
{
write(1, "(null)", 6);
*res += 6;
}
else
{
while (s[i])
{
ft_putchar(s[i], res);
i++;
}
}
}