///////////////////////////////////////////////////////
| 250 | |
| 251 | //////////////////////////////////////////////////////////// |
| 252 | std::string String::toAnsiString(const std::locale& locale, std::optional<char> replacement) const |
| 253 | { |
| 254 | // Prepare the output string |
| 255 | std::string output; |
| 256 | output.reserve(m_string.length() + 1); |
| 257 | |
| 258 | // Convert |
| 259 | Utf32::toAnsi(m_string.begin(), m_string.end(), std::back_inserter(output), replacement, locale); |
| 260 | |
| 261 | return output; |
| 262 | } |
| 263 | |
| 264 | |
| 265 | //////////////////////////////////////////////////////////// |
no test coverage detected