| 591 | } |
| 592 | |
| 593 | string CHexEscape(const StringPiece& src) { |
| 594 | const int dest_length = src.size() * 4 + 1; // Maximum possible expansion |
| 595 | unique_ptr<char[]> dest(new char[dest_length]); |
| 596 | const int len = CEscapeInternal(src.data(), src.size(), |
| 597 | dest.get(), dest_length, true, false); |
| 598 | DCHECK_GE(len, 0); |
| 599 | return string(dest.get(), len); |
| 600 | } |
| 601 | |
| 602 | string Utf8SafeCEscape(const StringPiece& src) { |
| 603 | const int dest_length = src.size() * 4 + 1; // Maximum possible expansion |
nothing calls this directly
no test coverage detected