-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_print_string.c
More file actions
28 lines (25 loc) · 1.13 KB
/
Copy pathft_print_string.c
File metadata and controls
28 lines (25 loc) · 1.13 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_string.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbah <mbah@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/20 17:42:31 by mbah #+# #+# */
/* Updated: 2024/11/23 16:13:24 by mbah ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_print_string(va_list params, t_flags flag)
{
char *str;
(void) flag;
str = (char *) va_arg(params, char *);
if (str == NULL)
{
ft_putstr_fd("(null)", 1);
return (6);
}
ft_putstr_fd(str, 1);
return (ft_strlen(str));
}