MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Char16AdvanceSet

Function Char16AdvanceSet

src/String.cpp:236–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236void Char16AdvanceSet(char16_t *&ioStr,int inChar)
237{
238 if (inChar>=0x10000)
239 {
240 int over = (inChar-0x10000);
241 if (over>=0x100000)
242 {
243 *ioStr++ = 0xfffd;
244 }
245 else
246 {
247 *ioStr++ = (over>>10) + 0xd800;
248 *ioStr++ = (over&0x3ff) + 0xdc00;
249 }
250 }
251 else if (IsUtf16Surrogate(inChar))
252 {
253 *ioStr++ = 0xfffd;
254 }
255 else
256 *ioStr++ = inChar;
257}
258
259
260template<typename T>

Callers 2

_hx_utf8_to_utf16Function · 0.85
wc_strMethod · 0.85

Calls 1

IsUtf16SurrogateFunction · 0.85

Tested by

no test coverage detected