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

Method CopyToString

common/internal/byte_string.cc:498–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498void ByteString::CopyToString(std::string* absl_nonnull out) const {
499 ABSL_DCHECK(out != nullptr);
500
501 switch (GetKind()) {
502 case ByteStringKind::kSmall:
503 out->assign(GetSmall());
504 break;
505 case ByteStringKind::kMedium:
506 out->assign(GetMedium());
507 break;
508 case ByteStringKind::kLarge:
509 absl::CopyCordToString(GetLarge(), out);
510 break;
511 }
512}
513
514void ByteString::AppendToString(std::string* absl_nonnull out) const {
515 ABSL_DCHECK(out != nullptr);

Callers 5

TEST_PFunction · 0.80
CopyToStringFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
CopyToStringFunction · 0.80

Calls 3

GetKindFunction · 0.85
GetSmallFunction · 0.85
GetMediumFunction · 0.85

Tested by 3

TEST_PFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64