-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr.c
28 lines (25 loc) · 1.06 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zelhajou <zelhajou@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/02 12:03:30 by zelhajou #+# #+# */
/* Updated: 2022/12/12 22:56:00 by zelhajou ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *str)
{
int len;
len = 0;
if (!str)
return (ft_putstr("(null)"));
while (*str != '\0')
{
len += ft_putchar(*str);
str++;
}
return (len);
}