16 lines
No EOL
158 B
C
16 lines
No EOL
158 B
C
#include "libft.h"
|
|
|
|
int ft_num_len(long num)
|
|
{
|
|
int len;
|
|
|
|
len = 1;
|
|
if (num > 9)
|
|
while (num)
|
|
{
|
|
num /= 10;
|
|
if (num)
|
|
len++;
|
|
}
|
|
return (len);
|
|
} |