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