MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / IsUtf16SurrogatePair

Function IsUtf16SurrogatePair

rtpose_wrapper/src/gtest/gtest-all.cpp:2778–2781  ·  view source on GitHub ↗

Determines if the arguments constitute UTF-16 surrogate pair and thus should be combined into a single Unicode code point using CreateCodePointFromUtf16SurrogatePair.

Source from the content-addressed store, hash-verified

2776// and thus should be combined into a single Unicode code point
2777// using CreateCodePointFromUtf16SurrogatePair.
2778inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
2779 return sizeof(wchar_t) == 2 &&
2780 (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
2781}
2782
2783// Creates a Unicode code point from UTF16 surrogate pair.
2784inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,

Callers 1

WideStringToUtf8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected