-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_uint_formater.c
More file actions
32 lines (30 loc) · 1.2 KB
/
ft_uint_formater.c
File metadata and controls
32 lines (30 loc) · 1.2 KB
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
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_uint_formater.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pabad-ap <pabad-ap@student.42barcel> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/28 11:03:00 by pabad-ap #+# #+# */
/* Updated: 2023/10/29 23:12:17 by pabad-ap ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
void ft_uint_formater(unsigned int n, int *str_len)
{
if (n >= 10)
{
ft_uint_formater(n / 10, str_len);
if (*str_len == -1)
return ;
ft_char_formater((n % 10 + 48), str_len);
if (*str_len == -1)
return ;
}
else
{
ft_char_formater((n % 10 + 48), str_len);
if (*str_len == -1)
return ;
}
}