42_cube3D/libftx/printf/ft_isarg.c

30 lines
1.1 KiB
C
Raw Permalink Normal View History

2023-04-26 07:02:44 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isarg.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/11 22:37:41 by cchauvet #+# #+# */
/* Updated: 2023/01/05 18:26:24 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_isarg(int c)
{
char *flags;
if (c == '\0')
return (1);
flags = "cspdiuxX%S";
while (*flags)
{
if (*flags == c)
return (1);
flags++;
}
return (0);
}