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

Function jl_validate_utf8

src/cli/config_json_like.c:1772–1784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1770}
1771
1772static int jl_validate_utf8(const char *text, size_t length) {
1773 size_t pos = 0;
1774 while (pos < length) {
1775 uint32_t codepoint = 0;
1776 size_t byte_count = 0;
1777 if (jl_decode_utf8((const unsigned char *)text + pos, length - pos, &codepoint,
1778 &byte_count) != 0) {
1779 return -1;
1780 }
1781 pos += byte_count;
1782 }
1783 return 0;
1784}
1785
1786static int jl_validate_key(const char *key) {
1787 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