MCPcopy Create free account
hub / github.com/antvis/F2Native / utf8_decode

Function utf8_decode

core/android/JNIUtil.cpp:415–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415static char32_t utf8_decode(const std::string & str, std::string::size_type & i) {
416 offset_pt res = utf8_decode_check(str, i);
417 if (res.offset < 0) {
418 i += 1;
419 return 0xFFFD;
420 } else {
421 i += res.offset;
422 return res.pt;
423 }
424}
425
426static void utf16_encode(char32_t pt, std::u16string & out) {
427 if (pt < 0x10000) {

Callers 1

jniStringFromUTF8Function · 0.85

Calls 1

utf8_decode_checkFunction · 0.85

Tested by

no test coverage detected