MCPcopy Create free account
hub / github.com/apache/impala / Utf8SafeCEscape

Function Utf8SafeCEscape

be/src/gutil/strings/escaping.cc:602–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602string Utf8SafeCEscape(const StringPiece& src) {
603 const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
604 unique_ptr<char[]> dest(new char[dest_length]);
605 const int len = CEscapeInternal(src.data(), src.size(),
606 dest.get(), dest_length, false, true);
607 DCHECK_GE(len, 0);
608 return string(dest.get(), len);
609}
610
611string Utf8SafeCHexEscape(const StringPiece& src) {
612 const int dest_length = src.size() * 4 + 1; // Maximum possible expansion

Callers 2

ParsePBFileHeaderFunction · 0.85
PrintValueMethod · 0.85

Calls 4

CEscapeInternalFunction · 0.85
getMethod · 0.65
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected