Basic index manipulation

This commit is contained in:
womax
2024-05-29 15:29:00 +02:00
parent be53633c4f
commit 135dd8d4eb
8 changed files with 364 additions and 37 deletions

11
src/utils.c Normal file
View File

@@ -0,0 +1,11 @@
#include <math.h>
#include "utils.h"
int decimal_len(size_t size)
{
if (size == 0)
return 1;
return floor(log10(size)) + 1;
}