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

Function jl_validate_utf8

src/cli/config_json_like.c:1839–1851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1837}
1838
1839static int jl_validate_utf8(const char *text, size_t length) {
1840 size_t pos = 0;
1841 while (pos < length) {
1842 uint32_t codepoint = 0;
1843 size_t byte_count = 0;
1844 if (jl_decode_utf8((const unsigned char *)text + pos, length - pos, &codepoint,
1845 &byte_count) != 0) {
1846 return -1;
1847 }
1848 pos += byte_count;
1849 }
1850 return 0;
1851}
1852
1853static int jl_validate_key(const char *key) {
1854 if (!key) {

Callers 3

jl_validate_documentFunction · 0.85
jl_validate_entryFunction · 0.85
jl_validate_string_valueFunction · 0.85

Calls 1

jl_decode_utf8Function · 0.85

Tested by

no test coverage detected