-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printf_utils.c
37 lines (33 loc) · 1.13 KB
/
ft_printf_utils.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
33
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: idakhlao <idakhlao@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/02 12:41:58 by idakhlao #+# #+# */
/* Updated: 2024/03/16 12:10:17 by idakhlao ### ########.fr */
/* */
/* ************************************************************************** */
#include "../includes/ft_printf.h"
int ft_putchar(char c)
{
write(1, &c, 1);
return (1);
}
int ft_putstr(char *str)
{
int i;
i = 0;
if (str == 0)
{
write(1, "(null)", 6);
return (6);
}
while (str[i])
{
write(1, &str[i], 1);
i++;
}
return (i);
}