-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_print_string.c
More file actions
29 lines (26 loc) · 1.07 KB
/
ft_print_string.c
File metadata and controls
29 lines (26 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_print_string.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bsousa-d <bsousa-d@student.42porto.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/03 14:40:32 by bsousa-d #+# #+# */
/* Updated: 2023/08/03 14:44:59 by bsousa-d ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/ft_printf.h"
int ft_print_string(char *s)
{
size_t i;
i = -1;
if (!s)
{
return (write(1, "(null)", 6));
}
while (s[++i])
{
ft_putchar_fd(s[i], 1);
}
return (i);
}