-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
31 lines (28 loc) · 1.05 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
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ael-maaz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/02 21:45:53 by ael-maaz #+# #+# */
/* Updated: 2024/01/03 16:17:18 by ael-maaz ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *s)
{
int i;
if (!s)
{
ft_putstr("(null)");
return (6);
}
i = 0;
while (s[i])
{
write(1, &s[i], 1);
i++;
}
return (i);
}