| 239 | } |
| 240 | |
| 241 | std::string_view StrTrimView(std::string_view str, std::string_view characters_to_trim) |
| 242 | { |
| 243 | size_t first_pos = str.find_first_not_of(characters_to_trim); |
| 244 | if (first_pos == std::string::npos) { |
| 245 | return std::string_view{}; |
| 246 | } |
| 247 | size_t last_pos = str.find_last_not_of(characters_to_trim); |
| 248 | return str.substr(first_pos, last_pos - first_pos + 1); |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Check whether the given string starts with the given prefix, ignoring case. |
no test coverage detected