32 lines
1.2 KiB
C
32 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_va_string.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/01/20 11:56:37 by gbaconni #+# #+# */
|
|
/* Updated: 2022/04/29 14:42:58 by gbaconni ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "ft_printf.h"
|
|
|
|
int ft_va_string(const char *format, va_list ap)
|
|
{
|
|
int ret;
|
|
char *s;
|
|
|
|
(void) format;
|
|
ret = 0;
|
|
s = va_arg(ap, char *);
|
|
if (s == NULL)
|
|
{
|
|
ret = ft_puts("(null)");
|
|
return (ret);
|
|
}
|
|
ret += ft_va_string_bonus(format, ap, s);
|
|
ret += ft_puts(s);
|
|
return (ret);
|
|
}
|