| 136 | } |
| 137 | |
| 138 | std::pair<bool, std::string::const_iterator> validate_utf8_string(const std::string& str) { |
| 139 | const auto end_iter = str.cend(); |
| 140 | for(auto iter = str.cbegin(); iter != end_iter; ++iter) { |
| 141 | const auto code = decode_utf8_char(iter, end_iter); |
| 142 | if(!code.first) { |
| 143 | return { false, iter }; |
| 144 | } |
| 145 | } |
| 146 | return { true, str.cend() }; |
| 147 | } |
| 148 | |
| 149 | #if defined(__APPLE__) |
| 150 | std::string utf8_decomp_to_precomp(const std::string& str) { |
no test coverage detected