MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / hex_dump

Function hex_dump

tests/peg-parser/test-unicode.cpp:14–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14static std::string hex_dump(const std::string& str) {
15 std::ostringstream oss;
16 for (unsigned char c : str) {
17 if (std::isprint(c)) {
18 oss << c;
19 } else {
20 oss << "\\x" << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(c);
21 }
22 }
23 return oss.str();
24}
25
26void test_unicode(testing &t) {
27 struct test_case {

Callers 1

test_unicodeFunction · 0.85

Calls 1

strMethod · 0.45

Tested by

no test coverage detected