| 873 | } // namespace |
| 874 | |
| 875 | StringValue StringValue::LowerAscii(google::protobuf::Arena* absl_nonnull arena) const { |
| 876 | ABSL_DCHECK(arena != nullptr); |
| 877 | |
| 878 | switch (value_.GetKind()) { |
| 879 | case common_internal::ByteStringKind::kSmall: { |
| 880 | std::string out; |
| 881 | if (!(LowerAsciiImpl)(value_.GetSmall(), &out)) { |
| 882 | return *this; |
| 883 | } |
| 884 | return StringValue::From(std::move(out), arena); |
| 885 | } |
| 886 | case common_internal::ByteStringKind::kMedium: { |
| 887 | std::string out; |
| 888 | if (!(LowerAsciiImpl)(value_.GetMedium(), &out)) { |
| 889 | return *this; |
| 890 | } |
| 891 | return StringValue::From(std::move(out), arena); |
| 892 | } |
| 893 | case common_internal::ByteStringKind::kLarge: |
| 894 | return StringValue::Wrap((LowerAsciiImpl)(value_.GetLarge())); |
| 895 | } |
| 896 | } |
| 897 | |
| 898 | namespace { |
| 899 | |