aboutsummaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 11:59:06 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-21 11:59:23 +0200
commita378ff1b173f7a67272e574fb1a2c275ecb9661b (patch)
tree9ee34a7491c7c7bd66cf39096bc62185eaa4ed09 /string.c
parent54db532879ed3f6d76463a3ab3f3895bd41c861c (diff)
test: rewrite tests
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index b07ba02..cc78719 100644
--- a/string.c
+++ b/string.c
@@ -11,6 +11,7 @@ Str *Str_new(Arena *a, uintptr_t len) {
return s;
}
+// Returns 1 if strings are equal, 0 otherwise
int Str_equals(Str a, Str b) {
return (a.len == b.len) && (!a.len || !memcmp(a.data, b.data, a.len));
}