MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / headerValue

Function headerValue

unittests/catch.hpp:10986–10997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10984 }
10985
10986 uint32_t headerValue(unsigned char c) {
10987 if ((c & 0xE0) == 0xC0) {
10988 return c & 0x1F;
10989 }
10990 if ((c & 0xF0) == 0xE0) {
10991 return c & 0x0F;
10992 }
10993 if ((c & 0xF8) == 0xF0) {
10994 return c & 0x07;
10995 }
10996 CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered");
10997 }
10998
10999 void hexEscapeChar(std::ostream& os, unsigned char c) {
11000 os << "\\x"

Callers 1

encodeToMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected