-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printf_str.c
30 lines (28 loc) · 1.07 KB
/
ft_printf_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
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_str.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: agoksu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/27 17:34:38 by agoksu #+# #+# */
/* Updated: 2022/11/27 17:34:42 by agoksu ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_printf_str(char *str, int *i)
{
int x;
if (!str)
{
ft_printf_str("(null)", i);
return ;
}
x = 0;
while (str[x])
{
write(1, &str[x], 1);
x++;
}
*i += x;
}