// function wxVsnprintfA (A for ANSI), should also find one for Unicode
// strings in Unicode build
#ifdef __WXMSW__
- #if defined(__VISUALC__) || wxUSE_NORLANDER_HEADERS
+ #if defined(__VISUALC__) || (defined(__MINGW32__) && wxUSE_NORLANDER_HEADERS)
#define wxVsnprintfA _vsnprintf
#endif
#else // !Windows
// ---------------------------------------------------------------------------
// standard C++ library string functions
// ---------------------------------------------------------------------------
+
#ifdef wxSTD_STRING_COMPATIBILITY
+void wxString::resize(size_t nSize, wxChar ch)
+{
+ size_t len = length();
+
+ if ( nSize < len )
+ {
+ Truncate(nSize);
+ }
+ else if ( nSize > len )
+ {
+ *this += wxString(ch, len - nSize);
+ }
+ //else: we have exactly the specified length, nothing to do
+}
+
+void wxString::swap(wxString& str)
+{
+ // this is slightly less efficient than fiddling with m_pchData directly,
+ // but it is still quite efficient as we don't copy the string here because
+ // ref count always stays positive
+ wxString tmp = str;
+ str = *this;
+ *this = str;
+}
+
wxString& wxString::insert(size_t nPos, const wxString& str)
{
wxASSERT( str.GetStringData()->IsValid() );