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

Method AsStringView

common/internal/byte_string.cc:641–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639}
640
641absl::string_view ByteString::AsStringView() const {
642 const ByteStringKind kind = GetKind();
643 ABSL_CHECK(kind == ByteStringKind::kSmall || // Crash OK
644 kind == ByteStringKind::kMedium);
645 switch (kind) {
646 case ByteStringKind::kSmall:
647 return GetSmall();
648 case ByteStringKind::kMedium:
649 return GetMedium();
650 case ByteStringKind::kLarge:
651 ABSL_UNREACHABLE();
652 }
653}
654
655google::protobuf::Arena* absl_nullable ByteString::GetMediumArena(
656 const MediumByteStringRep& rep) {

Callers 1

TEST_PFunction · 0.80

Calls 3

GetKindFunction · 0.85
GetSmallFunction · 0.85
GetMediumFunction · 0.85

Tested by 1

TEST_PFunction · 0.64