MCPcopy Create free account
hub / github.com/apache/thrift / toHexSequence

Function toHexSequence

lib/cpp/test/JSONProtoTest.cpp:303–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303static std::string toHexSequence(const std::string& str) {
304 std::stringstream ss;
305 ss << std::hex << std::setfill('0');
306 for (std::size_t i = 0; i < str.size(); i++) {
307 ss << "\\x" << int(uint8_t(str[i]));
308 }
309 return ss.str();
310}
311
312BOOST_AUTO_TEST_CASE(test_json_unicode_escaped) {
313 const char json_string[] =

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected