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

Function IntroCharTypeOf

lib/yamlcpp/src/stream.cpp:125–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123};
124
125inline UtfIntroCharType IntroCharTypeOf(std::istream::int_type ch) {
126 if (std::istream::traits_type::eof() == ch) {
127 return uictOther;
128 }
129
130 switch (ch) {
131 case 0:
132 return uict00;
133 case 0xBB:
134 return uictBB;
135 case 0xBF:
136 return uictBF;
137 case 0xEF:
138 return uictEF;
139 case 0xFE:
140 return uictFE;
141 case 0xFF:
142 return uictFF;
143 }
144
145 if ((ch > 0) && (ch < 0xFF)) {
146 return uictAscii;
147 }
148
149 return uictOther;
150}
151
152inline char Utf8Adjust(unsigned long ch, unsigned char lead_bits,
153 unsigned char rshift) {

Callers 1

StreamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected