MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / trailingBytes

Function trailingBytes

tests/framework/src/doctest.cpp:2046–2057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2044namespace {
2045
2046 size_t trailingBytes(unsigned char c) {
2047 if ((c & 0xE0) == 0xC0) {
2048 return 2;
2049 }
2050 if ((c & 0xF0) == 0xE0) {
2051 return 3;
2052 }
2053 if ((c & 0xF8) == 0xF0) {
2054 return 4;
2055 }
2056 DOCTEST_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
2057 }
2058
2059 uint32_t headerValue(unsigned char c) {
2060 if ((c & 0xE0) == 0xC0) {

Callers 1

encodeToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected