-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprint_str.c
27 lines (24 loc) · 1.06 KB
/
print_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
/* ************************************************************************** */
/* */
/* :::::::: */
/* print_str.c :+: :+: */
/* +:+ */
/* By: dreijans <[email protected]> +#+ */
/* +#+ */
/* Created: 2022/11/23 12:08:54 by dreijans #+# #+# */
/* Updated: 2022/11/25 15:20:59 by dreijans ######## odam.nl */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int print_str(char *s)
{
if (s == '\0')
{
return (write (1, "(null)", 6));
}
else
return (write (1, s, ft_strlen(s)));
}
/*
write returns how much it wrote
*/