More refactors to prepare for doc-search, including moving unicode support into ext.

This commit is contained in:
2026-01-14 12:30:44 -05:00
parent 4e374294b6
commit 850b4aa43b
10 changed files with 334 additions and 254 deletions

View File

@@ -196,18 +196,14 @@ int32_t read_ascii_char(string_view &source);
// Read a UTF8 codepoint from a string_view.
//
// If the string_view is empty, returns -1 and doesn't update
// the string_view.
//
// If the string_view contains an unfinished but possibly valid
// codepoint, returns -1 and doesn't update the string_view.
//
// If the next thing in the string_view is an invalid codepoint,
// returns -2 and doesn't update the string_view.
// See documentation in unicode-stuff.hpp
//
int32_t read_codepoint_utf8(string_view &source);
// Return true if the string is valid utf-8.
//
// See documentation in unicode-stuff.hpp
//
bool valid_utf8(string_view s);
// Return true if the number conforms to the spec.