summaryrefslogtreecommitdiff
path: root/src/std/str.c
blob: 27f8f682f882ca607d57b61187a841f26448a121 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}