-
Notifications
You must be signed in to change notification settings - Fork 1
/
ft_format_x.c
29 lines (26 loc) · 1.11 KB
/
ft_format_x.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_format_x.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: roudouch <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/23 09:07:23 by roudouch #+# #+# */
/* Updated: 2021/11/23 09:07:26 by roudouch ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_x_lower(va_list ptr, int fd)
{
char *str;
int i;
str = convert_base(va_arg(ptr, unsigned int), LOWER_HEXADECIMAL);
i = 0;
while (str[i])
{
ft_putchar(str[i], fd);
i++;
}
free(str);
return (i);
}