| 461 | } |
| 462 | |
| 463 | bool string_remove_suffix(std::string & str, const std::string_view & suffix) { |
| 464 | bool has_suffix = string_ends_with(str, suffix); |
| 465 | if (has_suffix) { |
| 466 | str = str.substr(0, str.size() - suffix.size()); |
| 467 | } |
| 468 | return has_suffix; |
| 469 | } |
| 470 | |
| 471 | size_t string_find_partial_stop(const std::string_view & str, const std::string_view & stop) { |
| 472 | if (!str.empty() && !stop.empty()) { |
no test coverage detected