-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_putstr.c
More file actions
34 lines (29 loc) · 1.12 KB
/
ft_putstr.c
File metadata and controls
34 lines (29 loc) · 1.12 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
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: havyilma <havyilma@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/23 19:11:18 by havyilma #+# #+# */
/* Updated: 2022/11/09 16:51:04 by havyilma ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_strlen(char *tab)
{
int i;
i = 0;
while (tab[i])
i++;
return (i);
}
int ft_putstr(char *str)
{
int i;
i = 0;
if (!str)
return (ft_putstr("(null)"));
write(1, str, ft_strlen(str));
return (ft_strlen(str));
}