MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cs_utf8_ok

Function cs_utf8_ok

internal/cbm/doclink_cs.c:177–186  ·  view source on GitHub ↗

True when s[0, n) is well-formed UTF-8. */

Source from the content-addressed store, hash-verified

175
176/* True when s[0, n) is well-formed UTF-8. */
177static bool cs_utf8_ok(const char *s, size_t n) {
178 for (size_t i = 0; i < n;) {
179 size_t l = cs_utf8_len((const unsigned char *)s + i, n - i);
180 if (l == 0) {
181 return false;
182 }
183 i += l;
184 }
185 return true;
186}
187
188/* ── Doc-comment references ──────────────────────────────────────── */
189

Callers 5

cs_put_text_nowsFunction · 0.85
cs_ident_dupFunction · 0.85
cs_put_sigFunction · 0.85
cs_namespace_name_dupFunction · 0.85
cs_text_tparamsFunction · 0.85

Calls 1

cs_utf8_lenFunction · 0.85

Tested by

no test coverage detected