MCPcopy Create free account
hub / github.com/MyGUI/mygui / getChar

Method getChar

MyGUIEngine/src/MyGUI_UString.cpp:719–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717 }
718
719 UString::unicode_char UString::getChar(size_type loc) const
720 {
721 const code_point* ptr = c_str();
722 unicode_char uc;
723 size_t l = _utf16_char_length(ptr[loc]);
724 code_point cp[2] = {/* blame the code beautifier */
725 0,
726 0};
727 cp[0] = ptr[loc];
728
729 if (l == 2 && (loc + 1) < mData.length())
730 {
731 cp[1] = ptr[loc + 1];
732 }
733 _utf16_to_utf32(cp, uc);
734 return uc;
735 }
736
737 int UString::setChar(size_type loc, unicode_char ch)
738 {

Callers 1

_getCharacterMethod · 0.80

Calls 2

c_strFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected