| 17 | #include <vector> |
| 18 | |
| 19 | [[nodiscard]] inline std::string TrimString(const std::string& str, const std::string& pattern = " \f\n\r\t\v") |
| 20 | { |
| 21 | std::string::size_type front = str.find_first_not_of(pattern); |
| 22 | if (front == std::string::npos) { |
| 23 | return std::string(); |
| 24 | } |
| 25 | std::string::size_type end = str.find_last_not_of(pattern); |
| 26 | return str.substr(front, end - front + 1); |
| 27 | } |
| 28 | |
| 29 | [[nodiscard]] inline std::string RemovePrefix(const std::string& str, const std::string& prefix) |
| 30 | { |
no outgoing calls