-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_printhex.c
24 lines (21 loc) · 1.08 KB
/
ft_printhex.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printhex.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: daxferab <[email protected] +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/18 01:53:48 by daxferab #+# #+# */
/* Updated: 2024/05/24 17:39:36 by daxferab ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_printhex(size_t num, char *hex_list)
{
int bytes;
bytes = 0;
if (num >= 16)
bytes += ft_printhex(num / 16, hex_list);
bytes += ft_printchar(hex_list[num % 16]);
return (bytes);
}