-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr.c
More file actions
executable file
·30 lines (27 loc) · 1.05 KB
/
ft_putstr.c
File metadata and controls
executable file
·30 lines (27 loc) · 1.05 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
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edforte <edforte@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/09/25 21:21:16 by edforte #+# #+# */
/* Updated: 2024/02/06 16:57:25 by edforte ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *str)
{
int i;
i = 0;
if (!str)
{
str = "(null)";
}
while (str[i] != '\0')
{
write(1, &str[i], 1);
i ++;
}
return (i);
}