MCPcopy Create free account
hub / github.com/csyonghe/Spire / EncodeUnicodePointToUTF16Reversed

Function EncodeUnicodePointToUTF16Reversed

Source/CoreLib/TextIO.h:225–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 }
224
225 inline int EncodeUnicodePointToUTF16Reversed(unsigned short * buffer, int codePoint)
226 {
227 int count = 0;
228 if (codePoint <= 0xD7FF || (codePoint >= 0xE000 && codePoint <= 0xFFFF))
229 buffer[count++] = ReverseBitOrder((unsigned short)codePoint);
230 else
231 {
232 int sub = codePoint - 0x10000;
233 int high = (sub >> 10) + 0xD800;
234 int low = (sub & 0x3FF) + 0xDC00;
235 buffer[count++] = ReverseBitOrder((unsigned short)high);
236 buffer[count++] = ReverseBitOrder((unsigned short)low);
237 }
238 return count;
239 }
240
241 class Encoding
242 {

Callers 1

GetBytesMethod · 0.85

Calls 1

ReverseBitOrderFunction · 0.85

Tested by

no test coverage detected