From 6a4a706fc909c13039b63136e881a9305fc7a395 Mon Sep 17 00:00:00 2001 From: Shav Kinderlehrer Date: Mon, 10 Apr 2023 14:36:45 -0400 Subject: Add multifile support --- src/lib.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib.c') diff --git a/src/lib.c b/src/lib.c index 0a98435..b7ee492 100644 --- a/src/lib.c +++ b/src/lib.c @@ -24,3 +24,14 @@ char *formatBytes(double *bytes) { return SIZES[div]; } + +int intlen(unsigned i) { + int l = 1; + + while (i > 9) { + l++; + i /= 10; + } + + return l; +} -- cgit v1.2.3