size_t m_nCopied;
};
-
-
-#ifdef __WINDOWS
+#ifdef __WINDOWS__
// on Windows, we should use %s and %c regardless of the build:
class wxPrintfFormatConverterWchar : public wxFormatConverterBase<wchar_t>
}
};
-const wxWCharBuffer wxScanfConvertFormatW(const wchar_t *format)
+const wxScopedWCharBuffer wxScanfConvertFormatW(const wchar_t *format)
{
return wxScanfFormatConverterWchar().Convert(format);
}
}
#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY
+wxString wxFormatString::InputAsString() const
+{
+ if ( m_str )
+ return *m_str;
+ if ( m_cstr )
+ return m_cstr->AsString();
+ if ( m_wchar )
+ return wxString(m_wchar);
+ if ( m_char )
+ return wxString(m_char);
+
+ wxFAIL_MSG( "invalid wxFormatString - not initialized?" );
+ return wxString();
+}
+
// ----------------------------------------------------------------------------
// wxFormatString::GetArgumentType()
// ----------------------------------------------------------------------------