Step 167: split EditorState into sub-states

This commit is contained in:
Bill
2026-02-09 20:43:36 -07:00
parent 5b6e8d72d8
commit de13e514e1
26 changed files with 3503 additions and 2689 deletions

11
editor/src/StringUtils.h Normal file
View File

@@ -0,0 +1,11 @@
#pragma once
#include <string>
#include <cctype>
static inline std::string trimCopy(const std::string& s) {
size_t start = 0;
while (start < s.size() && std::isspace((unsigned char)s[start])) ++start;
size_t end = s.size();
while (end > start && std::isspace((unsigned char)s[end - 1])) --end;
return s.substr(start, end - start);
}