added wxString::[w]char_str() to 2.8 for forward compatibility with wx3

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-02 12:25:40 +00:00
parent 3646999e0c
commit 89b6915f14
6 changed files with 93 additions and 3 deletions

View File

@@ -836,6 +836,14 @@ public:
// identical to c_str(), for MFC compatibility
const wxChar* GetData() const { return c_str(); }
// conversion to *non-const* multibyte or widestring buffer; modifying
// returned buffer won't affect the string, these methods are only useful
// for passing values to const-incorrect functions
wxWritableCharBuffer char_str() const { return mb_str(wxConvLibc); }
#if wxUSE_WCHAR_T
wxWritableWCharBuffer wchar_str() const { return wc_str(wxConvLibc); }
#endif
// conversion to/from plain (i.e. 7 bit) ASCII: this is useful for
// converting numbers or strings which are certain not to contain special
// chars (typically system functions, X atoms, environment variables etc.)