MCPcopy Create free account
hub / github.com/catchorg/Catch2 / trailingBytes

Function trailingBytes

extras/catch_amalgamated.cpp:8337–8348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8335namespace {
8336
8337 size_t trailingBytes(unsigned char c) {
8338 if ((c & 0xE0) == 0xC0) {
8339 return 2;
8340 }
8341 if ((c & 0xF0) == 0xE0) {
8342 return 3;
8343 }
8344 if ((c & 0xF8) == 0xF0) {
8345 return 4;
8346 }
8347 CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
8348 }
8349
8350 uint32_t headerValue(unsigned char c) {
8351 if ((c & 0xE0) == 0xC0) {

Callers 1

encodeToMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected