MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / utf8_encode_units

Function utf8_encode_units

StereoKitC/libraries/unicode.cpp:94–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92///////////////////////////////////////////
93
94int32_t utf8_encode_units(char32_t ch) {
95 if (ch <= 0x7F) return 1;
96 else if (ch <= 0x07FF) return 2;
97 else if (ch <= 0xFFFF) return 3;
98 else if (ch <= 0x10FFFF) return 4;
99 else return 0;
100}
101
102///////////////////////////////////////////
103

Callers 2

utf8_encode_appendFunction · 0.85
utf_insert_charFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected