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

Function trailingBytes

test/expected/catch.hpp:15127–15138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15125namespace {
15126
15127 size_t trailingBytes(unsigned char c) {
15128 if ((c & 0xE0) == 0xC0) {
15129 return 2;
15130 }
15131 if ((c & 0xF0) == 0xE0) {
15132 return 3;
15133 }
15134 if ((c & 0xF8) == 0xF0) {
15135 return 4;
15136 }
15137 CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
15138 }
15139
15140 uint32_t headerValue(unsigned char c) {
15141 if ((c & 0xE0) == 0xC0) {

Callers 1

encodeToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected