MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / IsUtf16SurrogatePair

Function IsUtf16SurrogatePair

tests/gtest/gtest-all.cc:3285–3288  ·  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

3283// and thus should be combined into a single Unicode code point
3284// using CreateCodePointFromUtf16SurrogatePair.
3285inline bool IsUtf16SurrogatePair(wchar_t first, wchar_t second) {
3286 return sizeof(wchar_t) == 2 &&
3287 (first & 0xFC00) == 0xD800 && (second & 0xFC00) == 0xDC00;
3288}
3289
3290// Creates a Unicode code point from UTF16 surrogate pair.
3291inline UInt32 CreateCodePointFromUtf16SurrogatePair(wchar_t first,

Callers 1

WideStringToUtf8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected