MCPcopy Create free account
hub / github.com/cinder/Cinder / get_sequence_4

Function get_sequence_4

include/utf8cpp/core.h:198–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

validate_nextFunction · 0.85

Calls 1

mask8Function · 0.85

Tested by

no test coverage detected