-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathputstr_format.c
28 lines (25 loc) · 1.1 KB
/
putstr_format.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* putstr_format.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jfreitas <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/28 11:09:50 by jfreitas #+# #+# */
/* Updated: 2020/02/24 14:27:17 by jfreitas ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void putstr_format(t_var *var, int len)
{
char *fmt;
if (len <= 0)
return ;
if (len > 0)
{
if (!(fmt = ft_substr(var->tmp_format, var->i - len, len)))
return ;
ft_putstr(fmt);
free(fmt);
}
}