-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
32 lines (29 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ael-haib <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/25 03:14:01 by ael-haib #+# #+# */
/* Updated: 2024/03/29 11:20:55 by ael-haib ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *s)
{
int i;
int j;
j = 0;
i = 0;
if (!s)
{
return (j += ft_putstr("(null)"));
}
while (s[i])
{
j += ft_putchar(s[i]);
i++;
}
return (j);
}