libftx/printf/ft_isarg.c
Camille Chauvet 3256ce67f7 kekw
2022-12-22 17:57:19 +01:00

30 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isarg.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/11 22:37:41 by cchauvet #+# #+# */
/* Updated: 2022/10/12 16:09:22 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_isarg(int c)
{
char *flags;
if (c == '\0')
return (1);
flags = "cspdiuxX%";
while (*flags)
{
if (*flags == c)
return (1);
flags++;
}
return (0);
}