| 55 | |
| 56 | template <typename Bytes> |
| 57 | std::string StringDebugString(const Bytes& value) { |
| 58 | return value.NativeValue(absl::Overload( |
| 59 | [](absl::string_view string) -> std::string { |
| 60 | return internal::FormatStringLiteral(string); |
| 61 | }, |
| 62 | [](const absl::Cord& cord) -> std::string { |
| 63 | if (auto flat = cord.TryFlat(); flat.has_value()) { |
| 64 | return internal::FormatStringLiteral(*flat); |
| 65 | } |
| 66 | return internal::FormatStringLiteral(static_cast<std::string>(cord)); |
| 67 | })); |
| 68 | } |
| 69 | |
| 70 | } // namespace |
| 71 |
no test coverage detected