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

Function Utf8SafeCHexEscape

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

Source from the content-addressed store, hash-verified

609}
610
611string Utf8SafeCHexEscape(const StringPiece& src) {
612 const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
613 unique_ptr<char[]> dest(new char[dest_length]);
614 const int len = CEscapeInternal(src.data(), src.size(),
615 dest.get(), dest_length, true, true);
616 DCHECK_GE(len, 0);
617 return string(dest.get(), len);
618}
619
620// ----------------------------------------------------------------------
621// BackslashEscape and BackslashUnescape

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected