Add wxString::wc_string() for consistency

We have utf8_str() and utf8_string(), but no similar equivalent for
wc_str(), so add one too, it seems nicer to use than ToStdWstring().

Closes #23463.
This commit is contained in:
Vadim Zeitlin 2023-04-18 16:49:01 +02:00
parent 2b8c409824
commit 7465d8297e
3 changed files with 33 additions and 2 deletions

View file

@ -628,6 +628,8 @@ TEST_CASE("StdString::Conversion", "[stdstring]")
#endif
CHECK( s6 == L"hello" );
CHECK( s4.wc_string() == L"hello" );
#if wxUSE_STD_STRING_CONV_IN_WXSTRING
#if !defined(wxNO_UNSAFE_WXSTRING_CONV)
std::string s7(s4);