| 485 | } |
| 486 | |
| 487 | std::string ByteString::ToString() const { |
| 488 | switch (GetKind()) { |
| 489 | case ByteStringKind::kSmall: |
| 490 | return std::string(GetSmall()); |
| 491 | case ByteStringKind::kMedium: |
| 492 | return std::string(GetMedium()); |
| 493 | case ByteStringKind::kLarge: |
| 494 | return static_cast<std::string>(GetLarge()); |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | void ByteString::CopyToString(std::string* absl_nonnull out) const { |
| 499 | ABSL_DCHECK(out != nullptr); |