diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 22:47:46 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 22:47:46 +1100 |
commit | 7b3afcaf77f96e7d62f6cd1623ead7f17512d79f (patch) | |
tree | b5f82c64e9c06a84e4d095ab4ac48712e860b673 /src/std/str.c | |
parent | b047be5252aeb981faea077409c1768fda0301d9 (diff) |
repo init. partial port of existing code
Diffstat (limited to 'src/std/str.c')
-rw-r--r-- | src/std/str.c | 14 |
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 |