| 213 | |
| 214 | template <typename octet_iterator> |
| 215 | utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t& code_point) |
| 216 | { |
| 217 | if (it == end) |
| 218 | return NOT_ENOUGH_ROOM; |
| 219 | |
| 220 | code_point = utf8::internal::mask8(*it); |
| 221 | |
| 222 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 223 | |
| 224 | code_point = ((code_point << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); |
| 225 | |
| 226 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 227 | |
| 228 | code_point += (utf8::internal::mask8(*it) << 6) & 0xfff; |
| 229 | |
| 230 | UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) |
| 231 | |
| 232 | code_point += (*it) & 0x3f; |
| 233 | |
| 234 | return UTF8_OK; |
| 235 | } |
| 236 | |
| 237 | #undef UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR |
| 238 |
no test coverage detected