-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_nbrlen.c
26 lines (24 loc) · 1.01 KB
/
ft_nbrlen.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_nbrlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ylagtab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/09/22 00:05:39 by ylagtab #+# #+# */
/* Updated: 2020/10/14 11:57:46 by ylagtab ### ########.fr */
/* */
/* ************************************************************************** */
int ft_nbrlen(__uint128_t nbr)
{
int len;
if (nbr == 0)
return (1);
len = 0;
while (nbr)
{
len++;
nbr /= 10;
}
return (len);
}