summaryrefslogtreecommitdiff
path: root/src/std/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/std/str.c')
-rw-r--r--src/std/str.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/std/str.c b/src/std/str.c
new file mode 100644
index 0000000..27f8f68
--- /dev/null
+++ b/src/std/str.c
@@ -0,0 +1,14 @@
+#include "str.h"
+
+bool str8_equals(str8 a, str8 b) {
+ if (a.len != b.len) {
+ return false;
+ }
+
+ for (size_t i = 0; i < a.len; i++) {
+ if (a.buf[i] != b.buf[i]) {
+ return false;
+ }
+ }
+ return true;
+} \ No newline at end of file