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

Method LowerAscii

common/values/string_value.cc:875–896  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873} // namespace
874
875StringValue 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
898namespace {
899

Callers 2

TEST_FFunction · 0.80
LowerAsciiFunction · 0.80

Calls 2

GetKindMethod · 0.80
WrapFunction · 0.70

Tested by 1

TEST_FFunction · 0.64