MCPcopy Create free account
hub / github.com/davisking/dlib / unichar_to_surrogate_pair

Function unichar_to_surrogate_pair

dlib/unicode/unicode.cpp:13–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13 void unichar_to_surrogate_pair(unichar input, unichar &first, unichar &second)
14 {
15 using namespace unicode_helpers;
16 first = ((input - SMP_TOP) >> VALID_BITS) | SURROGATE_FIRST_TOP;
17 second = (input & SURROGATE_CLEARING_MASK) | SURROGATE_SECOND_TOP;
18 }
19
20 template <int N> struct ustring2wstr
21 {

Callers 2

ustring2wstrMethod · 0.85
create_helperMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected