MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/TriangleMeshDistance / trailingBytes

Function trailingBytes

tests/catch.hpp:12489–12500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12487namespace {
12488
12489 size_t trailingBytes(unsigned char c) {
12490 if ((c & 0xE0) == 0xC0) {
12491 return 2;
12492 }
12493 if ((c & 0xF0) == 0xE0) {
12494 return 3;
12495 }
12496 if ((c & 0xF8) == 0xF0) {
12497 return 4;
12498 }
12499 CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
12500 }
12501
12502 uint32_t headerValue(unsigned char c) {
12503 if ((c & 0xE0) == 0xC0) {

Callers 1

encodeToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected