-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr.c
More file actions
30 lines (27 loc) · 1.09 KB
/
ft_putstr.c
File metadata and controls
30 lines (27 loc) · 1.09 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kfouad < kfouad@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/27 17:24:01 by kfouad #+# #+# */
/* Updated: 2022/11/08 12:38:43 by kfouad ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *str)
{
int i;
int count;
count = 0;
i = 0;
if (!str)
count += ft_putstr("(null)");
while (str && str[i])
{
write(1, &str[i++], 1);
count++;
}
return (count);
}