-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_print_s-rnavarre.c
More file actions
28 lines (25 loc) · 1.09 KB
/
ft_print_s-rnavarre.c
File metadata and controls
28 lines (25 loc) · 1.09 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_s.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adiaz-lo <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/08/04 12:51:37 by adiaz-lo #+# #+# */
/* Updated: 2023/12/15 11:20:53 by adiaz-lo ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_print_s(char *str)
{
int count;
size_t len;
if (str == NULL)
{
return (write(1, "(null)", 6));
}
count = 0;
len = ft_strlen(str);
count += write(1, str, len);
return (count);
}