| 160 | } |
| 161 | |
| 162 | [[nodiscard]] inline std::string_view TrimStringView(std::string_view str, std::string_view pattern = " \f\n\r\t\v") |
| 163 | { |
| 164 | std::string::size_type front = str.find_first_not_of(pattern); |
| 165 | if (front == std::string::npos) { |
| 166 | return {}; |
| 167 | } |
| 168 | std::string::size_type end = str.find_last_not_of(pattern); |
| 169 | return str.substr(front, end - front + 1); |
| 170 | } |
| 171 | |
| 172 | [[nodiscard]] inline std::string TrimString(std::string_view str, std::string_view pattern = " \f\n\r\t\v") |
| 173 | { |
no outgoing calls