///////////////////////////////////////////////////////
| 278 | |
| 279 | //////////////////////////////////////////////////////////// |
| 280 | U8String String::toUtf8(std::optional<std::uint8_t> replacement) const |
| 281 | { |
| 282 | // Prepare the output string |
| 283 | U8String output; |
| 284 | output.reserve(m_string.length()); |
| 285 | |
| 286 | // Convert |
| 287 | Utf32::toUtf8(m_string.begin(), m_string.end(), std::back_inserter(output), replacement); |
| 288 | |
| 289 | return output; |
| 290 | } |
| 291 | |
| 292 | |
| 293 | //////////////////////////////////////////////////////////// |
no test coverage detected