MCPcopy Create free account
hub / github.com/Tencent/rapidjson / decode

Function decode

test/unittest/encodingstest.cpp:265–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263};
264
265static unsigned inline decode(unsigned* state, unsigned* codep, unsigned byte) {
266 unsigned type = utf8d[byte];
267
268 *codep = (*state != UTF8_ACCEPT) ?
269 (byte & 0x3fu) | (*codep << 6) :
270 (0xff >> type) & (byte);
271
272 *state = utf8d[256 + *state + type];
273 return *state;
274}
275
276//static bool IsUTF8(unsigned char* s) {
277// unsigned codepoint, state = 0;

Callers 1

TESTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected