struct String8 {
  u8* str;
  u64 size;

  const char *c() const { return reinterpret_cast<const char *>(str); }
  u8 operator[](u64 idx) const {
    assert(idx < size);
    return str[idx];
  }
};

#define str8(s) String8 { (u8*)(s), sizeof(s) - 1 }

struct String8_Node {
  String8_Node *next, *prev, *head;
  String8_Node *first_child, *last_child;
  String8_Node *parent;
  String8 str;
};