MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / trailingBytes

Function trailingBytes

Bcore/src/main/cpp/Dobby/tests/catch.hpp:10891–10902  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10889namespace {
10890
10891size_t trailingBytes(unsigned char c) {
10892 if ((c & 0xE0) == 0xC0) {
10893 return 2;
10894 }
10895 if ((c & 0xF0) == 0xE0) {
10896 return 3;
10897 }
10898 if ((c & 0xF8) == 0xF0) {
10899 return 4;
10900 }
10901 CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
10902}
10903
10904uint32_t headerValue(unsigned char c) {
10905 if ((c & 0xE0) == 0xC0) {

Callers 1

encodeToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected