-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr.c
More file actions
29 lines (27 loc) · 1.09 KB
/
ft_putstr.c
File metadata and controls
29 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: halhashm <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 14:19:54 by halhashm #+# #+# */
/* Updated: 2021/11/17 12:35:38 by halhashm ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
void ft_putstr(char *s, int *i)
{
if (s == NULL)
{
write(1, "(null)", 6);
*i += 6;
return ;
}
else if (*s != '\0')
{
write(1, s, ft_strlen(s));
*i += ft_strlen(s);
return ;
}
}