initial commit

This commit is contained in:
2026-04-12 19:22:07 +02:00
commit 65521e4df1
10 changed files with 457 additions and 0 deletions

22
src/helper.c Normal file
View File

@@ -0,0 +1,22 @@
#include "helper.h"
#include "types.h"
int noom_startswith(const char* str, char* compare) {
noom_uint_t i = 0;
while (1) {
if (compare[i] == '\0') return 1; // we did it
if (str[i] != compare[i]) return 0;
i++;
}
return 0; // unreachable but whatevs
}
int noom_streql(const char* stra, noom_uint_t lena, const char* strb, noom_uint_t lenb) {
if (lena != lenb) return 0;
for (noom_uint_t i = 0; i < lena; i++) {
if (stra[i] != strb[i]) return 0;
}
return 1;
}