| 204 | } |
| 205 | |
| 206 | std::string trim_spaces(std::string value) { |
| 207 | auto is_space = [](unsigned char ch) { return std::isspace(ch) != 0; }; |
| 208 | value.erase(value.begin(), std::find_if(value.begin(), value.end(), [&](char ch) { return !is_space(static_cast<unsigned char>(ch)); })); |
| 209 | value.erase(std::find_if(value.rbegin(), value.rend(), [&](char ch) { return !is_space(static_cast<unsigned char>(ch)); }).base(), value.end()); |
| 210 | return value; |
| 211 | } |
| 212 | |
| 213 | std::string decompose_korean_hangul(std::string_view text) { |
| 214 | std::string out; |
no test coverage detected