MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / StringDebugString

Function StringDebugString

common/values/string_value.cc:57–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55
56template <typename Bytes>
57std::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

Callers 1

DebugStringMethod · 0.85

Calls 4

FormatStringLiteralFunction · 0.85
TryFlatMethod · 0.80
NativeValueMethod · 0.45
has_valueMethod · 0.45

Tested by

no test coverage detected