| 28 | } |
| 29 | |
| 30 | bool is_python_string_prefix(std::string_view prefix) { |
| 31 | const std::string lowered = string_tolower(std::string(prefix)); |
| 32 | static constexpr std::string_view valid_prefixes[] = { |
| 33 | "r", |
| 34 | "u", |
| 35 | "b", |
| 36 | "f", |
| 37 | "rb", |
| 38 | "br", |
| 39 | "rf", |
| 40 | "fr", |
| 41 | }; |
| 42 | |
| 43 | return std::find(std::begin(valid_prefixes), std::end(valid_prefixes), lowered) != |
| 44 | std::end(valid_prefixes); |
| 45 | } |
| 46 | |
| 47 | } // namespace |
| 48 |
no test coverage detected