MCPcopy Create free account
hub / github.com/apache/trafficserver / Utf8Adjust

Function Utf8Adjust

lib/yamlcpp/src/stream.cpp:152–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152inline char Utf8Adjust(unsigned long ch, unsigned char lead_bits,
153 unsigned char rshift) {
154 const unsigned char header =
155 static_cast<unsigned char>(((1 << lead_bits) - 1) << (8 - lead_bits));
156 const unsigned char mask = (0xFF >> (lead_bits + 1));
157 return static_cast<char>(
158 static_cast<unsigned char>(header | ((ch >> rshift) & mask)));
159}
160
161inline void QueueUnicodeCodepoint(std::deque<char>& q, unsigned long ch) {
162 // We are not allowed to queue the Stream::eof() codepoint, so

Callers 1

QueueUnicodeCodepointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected