MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Utf16DecodeSurrogate

Function Utf16DecodeSurrogate

src/string_func.h:86–89  ·  view source on GitHub ↗

* Convert an UTF-16 surrogate pair to the corresponding Unicode character. * @param lead Lead surrogate code point. * @param trail Trail surrogate code point. * @return Decoded Unicode character. */

Source from the content-addressed store, hash-verified

84 * @return Decoded Unicode character.
85 */
86inline char32_t Utf16DecodeSurrogate(uint lead, uint trail)
87{
88 return 0x10000 + (((lead - 0xD800) << 10) | (trail - 0xDC00));
89}
90
91/**
92 * Decode an UTF-16 character.

Callers 2

Utf16DecodeCharFunction · 0.85
HandleCharMsgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected