-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printstr.c
32 lines (27 loc) · 1.14 KB
/
ft_printstr.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
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mriant <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/07 10:59:55 by mriant #+# #+# */
/* Updated: 2022/02/16 12:15:18 by mriant ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_putchar_int(char c, int fd)
{
int result;
result = write(fd, &c, 1);
return (result);
}
int ft_putstr_int(char *s, int fd)
{
int result;
if (!s)
result = write(fd, "(null)", 6);
else
result = write(fd, s, ft_strlen(s));
return (result);
}