| 2001 | } |
| 2002 | |
| 2003 | void UString::_load_buffer_UTF8() const |
| 2004 | { |
| 2005 | _getBufferStr(); |
| 2006 | std::string& buffer = (*m_buffer.mStrBuffer); |
| 2007 | buffer.reserve(length()); |
| 2008 | |
| 2009 | unsigned char utf8buf[6]; |
| 2010 | char* charbuf = (char*)utf8buf; |
| 2011 | unicode_char c; |
| 2012 | size_t len; |
| 2013 | |
| 2014 | const_iterator i; |
| 2015 | const_iterator ie = end(); |
| 2016 | for (i = begin(); i != ie; i.moveNext()) |
| 2017 | { |
| 2018 | c = i.getCharacter(); |
| 2019 | len = _utf32_to_utf8(c, utf8buf); |
| 2020 | size_t j = 0; |
| 2021 | while (j < len) |
| 2022 | buffer.push_back(charbuf[j++]); |
| 2023 | } |
| 2024 | } |
| 2025 | |
| 2026 | void UString::_load_buffer_WStr() const |
| 2027 | { |
nothing calls this directly
no test coverage detected