-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_mininbr.c
30 lines (28 loc) · 1.08 KB
/
ft_mininbr.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
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hfeufeu <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/02 16:09:08 by hfeufeu #+# #+# */
/* Updated: 2024/11/02 17:50:12 by hfeufeu ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_mininbr(int nb)
{
int len;
char *txt;
len = 0;
txt = ft_itoa(nb);
if (!txt)
{
free(txt);
return (0);
}
len = ft_strlen(txt);
ft_ministr(txt);
free(txt);
return (len);
}