Rename all ft_vprintf_*.c to ft_va_*.c

This commit is contained in:
gbaconni
2022-04-29 15:18:54 +02:00
parent 1cb8c78ae3
commit 2b5b1de944
18 changed files with 172 additions and 118 deletions

View File

@@ -0,0 +1,30 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_va_string_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/20 11:56:37 by gbaconni #+# #+# */
/* Updated: 2022/04/29 14:41:41 by gbaconni ### ########.fr */
/* */
/* ************************************************************************** */
#include "libftprintf.h"
int ft_va_string_bonus(const char *format, va_list ap, char *s)
{
int ret;
int precision;
int len;
ret = 0;
precision = ft_va_precision_bonus(format, ap);
if (precision > 0)
{
len = precision - ft_strlen(s);
while (len-- > 0)
ret += ft_putchar(' ');
}
return (ret);
}