-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf_str.c
31 lines (28 loc) · 1.07 KB
/
ft_printf_str.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
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_str.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dalcabre <dalcabre@student.42urduliz.co +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/06 13:28:39 by dalcabre #+# #+# */
/* Updated: 2024/02/07 12:30:02 by dalcabre ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_printf_str(const char *str)
{
int i;
i = 0;
if (!str)
{
write(1, "(null)", 6);
return (6);
}
while (str[i])
{
write(1, &str[i], 1);
i++;
}
return (i);
}