-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
executable file
·27 lines (25 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ahel-bah <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 18:57:29 by ahel-bah #+# #+# */
/* Updated: 2021/11/29 10:40:41 by ahel-bah ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_putstr(char *s, int *len)
{
if (!s)
{
write(1, "(null)", 6);
(*len) = (*len) + 6;
}
else
{
(*len) = (*len) + ft_strlen(s);
write(1, s, ft_strlen(s));
}
}