| 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 | { |
no test coverage detected