-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_s.c
26 lines (23 loc) · 1.12 KB
/
get_s.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_s.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rnishimo <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/02 06:02:06 by rnishimo #+# #+# */
/* Updated: 2021/12/03 09:00:52 by rnishimo ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void get_s(va_list ap, t_str *st_str)
{
char *str;
str = va_arg(ap, char *);
if (str == NULL)
str = "(null)";
st_str->str = ft_strdup(str);
if (st_str->str == NULL)
return ;
st_str->size = ft_strlen(st_str->str);
}