-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_pfstr.c
36 lines (33 loc) · 1.17 KB
/
ft_pfstr.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_pfstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: amacarul <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/24 12:46:38 by amacarul #+# #+# */
/* Updated: 2024/09/27 10:45:22 by amacarul ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
void ft_pfstr(char *s, size_t *count)
{
int i;
char *null_str;
null_str = "(null)";
if (s == NULL)
{
while (*null_str != '\0')
{
ft_pfchar(*null_str, count);
null_str ++;
}
return ;
}
i = 0;
while (s[i] != '\0')
{
ft_pfchar(s[i], count);
i ++;
}
}