-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_printf_utils.c
More file actions
36 lines (32 loc) · 1.12 KB
/
ft_printf_utils.c
File metadata and controls
36 lines (32 loc) · 1.12 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
30
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: psydenst <psydenst@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/28 15:50:43 by psydenst #+# #+# */
/* Updated: 2022/06/30 16:35:57 by psydenst ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
int ft_putstr(char *s)
{
int i;
i = 0;
if (s == NULL)
{
write(1, "(null)", 6);
return (6);
}
while (s[i] != '\0')
{
write(1, &s[i++], 1);
}
return (i);
}
int ft_putchar(int c)
{
write(1, &c, 1);
return (1);
}