| 457 | } |
| 458 | |
| 459 | bool string_ends_with(const std::string_view & str, const std::string_view & suffix) { |
| 460 | return str.size() >= suffix.size() && str.compare(str.size()-suffix.size(), suffix.size(), suffix) == 0; |
| 461 | } |
| 462 | |
| 463 | bool string_remove_suffix(std::string & str, const std::string_view & suffix) { |
| 464 | bool has_suffix = string_ends_with(str, suffix); |
no test coverage detected