| 78 | } |
| 79 | |
| 80 | int CountSubstrings(absl::string_view text, absl::string_view substr) { |
| 81 | int count = 0; |
| 82 | size_t pos = 0; |
| 83 | while ((pos = text.find(substr, pos)) != absl::string_view::npos) { |
| 84 | ++count; |
| 85 | ++pos; |
| 86 | } |
| 87 | return count; |
| 88 | } |
| 89 | |
| 90 | absl::StatusOr<std::unique_ptr<cel::Compiler>> CreateBasicCompiler() { |
| 91 | CEL_ASSIGN_OR_RETURN( |