+#endif
+
+#if wxUSE_UNICODE
+const char* wxCStrData::AsChar() const
+{
+ wxString *str = wxConstCast(m_str, wxString);
+ // convert the string and keep it:
+ str->m_convertedToChar = str->mb_str().release();
+ return str->m_convertedToChar + m_offset;
+}
+#endif // wxUSE_UNICODE
+
+#if !wxUSE_UNICODE_WCHAR
+const wchar_t* wxCStrData::AsWChar() const
+{
+ wxString *str = wxConstCast(m_str, wxString);
+ // convert the string and keep it:
+ str->m_convertedToWChar = str->wc_str().release();
+ return str->m_convertedToWChar + m_offset;
+}
+#endif // !wxUSE_UNICODE_WCHAR
+
+// ===========================================================================
+// wxString class core
+// ===========================================================================
+
+// ---------------------------------------------------------------------------
+// construction and conversion
+// ---------------------------------------------------------------------------