-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr_bonus.c
More file actions
31 lines (28 loc) · 1.08 KB
/
Copy pathft_putstr_bonus.c
File metadata and controls
31 lines (28 loc) · 1.08 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
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: obouizi <obouizi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/29 17:52:48 by obouizi #+# #+# */
/* Updated: 2024/12/05 20:49:31 by obouizi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf_bonus.h"
int ft_putstr(char *s)
{
int count;
count = 0;
if (!s)
count += write(1, "(null)", 6);
else
{
while (*s)
{
count += write(1, s, 1);
s++;
}
}
return (count);
}