-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_printf_flags_utils.c
29 lines (25 loc) · 1.13 KB
/
ft_printf_flags_utils.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
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf_flags_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: arcanava <arcanava@student.42barcel> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/19 19:52:15 by arcanava #+# #+# */
/* Updated: 2024/04/30 12:43:23 by arcanava ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int is_flag(char c)
{
return (c == '#' || c == '+' || c == ' '
|| c == '-' || c == '0');
}
int is_hex_spec(char c)
{
return (c == 'x' || c == 'X');
}
int is_number_spec(char c)
{
return (c == 'd' || c == 'i' || c == 'u' || c == 'l');
}