///////////////////////////////////////////////////////
| 292 | |
| 293 | //////////////////////////////////////////////////////////// |
| 294 | std::u16string String::toUtf16(std::optional<std::uint16_t> replacement) const |
| 295 | { |
| 296 | // Prepare the output string |
| 297 | std::u16string output; |
| 298 | output.reserve(m_string.length()); |
| 299 | |
| 300 | // Convert |
| 301 | Utf32::toUtf16(m_string.begin(), m_string.end(), std::back_inserter(output), replacement); |
| 302 | |
| 303 | return output; |
| 304 | } |
| 305 | |
| 306 | |
| 307 | //////////////////////////////////////////////////////////// |
no test coverage detected