-
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.07 KB
/
Copy pathft_putstr.c
File metadata and controls
29 lines (27 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ybounite <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/16 17:48:10 by ybounite #+# #+# */
/* Updated: 2024/11/16 17:48:13 by ybounite ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *str)
{
int res;
int i;
i = 0;
res = 0;
if (!str)
return (ft_putstr("(null)"));
while (str[i])
{
res += ft_putchar(str[i]);
i++;
}
return (res);
}