-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr.c
28 lines (25 loc) · 1.12 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: ozamora- <ozamora-@student.42madrid.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/17 11:39:05 by ozamora- #+# #+# */
/* Updated: 2024/10/22 14:33:42 by ozamora- ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
size_t ft_putstr(char *str)
{
size_t str_len;
str_len = 0;
if (str == NULL)
{
str_len += ft_putstr("(null)");
return (str_len);
}
while (str[str_len] != '\0')
str_len += ft_putchar(str[str_len]);
return (str_len);
}