| 123 | } |
| 124 | |
| 125 | std::string trim(const std::string& input, const std::string& characters) { |
| 126 | auto index = input.find_first_not_of(characters); |
| 127 | if (index == std::string::npos) { |
| 128 | return ""; |
| 129 | } else { |
| 130 | auto end_index = input.find_last_not_of(characters); |
| 131 | return input.substr(index, end_index - index + 1); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | } // namespace |
no outgoing calls
no test coverage detected