-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr.c
More file actions
31 lines (28 loc) · 1.07 KB
/
ft_putstr.c
File metadata and controls
31 lines (28 loc) · 1.07 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.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sel-abbo <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/21 02:03:55 by sel-abbo #+# #+# */
/* Updated: 2024/11/22 23:20:01 by sel-abbo ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *s)
{
int count;
count = 0;
if (!s)
{
count += ft_putstr("(null)");
return (count);
}
while (*s)
{
write(1, s++, 1);
count++;
}
return (count);
}