| 196 | |
| 197 | template <typename octet_iterator> |
| 198 | utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t& code_point) |
| 199 | { |
| 200 | if (it == end) |
| 201 | return NOT_ENOUGH_ROOM; |
| 202 | |
| 203 | code_point = utf8::internal::mask8(*it); |
| 204 | |
| 205 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 206 | |
| 207 | code_point = ((code_point << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); |
| 208 | |
| 209 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 210 | |
| 211 | code_point += (utf8::internal::mask8(*it) << 6) & 0xfff; |
| 212 | |
| 213 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 214 | |
| 215 | code_point += (*it) & 0x3f; |
| 216 | |
| 217 | return UTF8_OK; |
| 218 | } |
| 219 | |
| 220 | #undef UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR |
| 221 |
no test coverage detected