-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ilen.c
26 lines (23 loc) · 1012 Bytes
/
ft_ilen.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_ilen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jraymond <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/04 12:03:51 by jraymond #+# #+# */
/* Updated: 2018/04/04 12:05:08 by jraymond ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_ilen(int nb)
{
int res;
res = 0;
while (nb)
{
nb /= 10;
res++;
}
return (res);
}