| 63 | } |
| 64 | |
| 65 | static std::string_view trim(std::string_view str) |
| 66 | { |
| 67 | static const char* whitespaces = "\t\n "; |
| 68 | auto beg = str.find_first_not_of(whitespaces); |
| 69 | if (beg == str.npos) { |
| 70 | return {}; |
| 71 | } |
| 72 | auto end = str.find_last_not_of(whitespaces); |
| 73 | return str.substr(beg, end - beg + 1); |
| 74 | } |
| 75 | |
| 76 | int get_str_map( |
| 77 | const string &str, |
no test coverage detected