#endif // OS/compiler
}
+// wxSnprintf() is like snprintf() if it's available and sprintf() (always
+// available, but dangerous!) if not
+extern int WXDLLEXPORT wxSnprintf(wxChar *buf, size_t len,
+ const wxChar *format, ...);
+
+// and wxVsnprintf() is like vsnprintf() or vsprintf()
+extern int WXDLLEXPORT wxVsnprintf(wxChar *buf, size_t len,
+ const wxChar *format, va_list argptr);
+
// return an empty wxString
class WXDLLEXPORT wxString; // not yet defined
inline const wxString& wxGetEmptyString() { return *(wxString *)&wxEmptyString; }
wxString(const unsigned char* psz, size_t nLength = wxSTRING_MAXLEN)
{ InitWith((const char*)psz, 0, nLength); }
// from multibyte string
- wxString(const char *psz, wxMBConv& WXUNUSED(conv), size_t nLength = wxSTRING_MAXLEN)
+ wxString(const char *psz, wxMBConv& WXUNUSED(conv) , size_t nLength = wxSTRING_MAXLEN)
{ InitWith(psz, 0, nLength); }
#if wxUSE_WCHAR_T
// operator version of GetChar
wxChar operator[](int n) const
{ ASSERT_VALID_INDEX( n ); return m_pchData[n]; }
- // operator version of GetWritableChar
+#ifdef __alpha__
+ // operator version of GetChar
+ wxChar operator[](unsigned int n) const
+ { ASSERT_VALID_INDEX( n ); return m_pchData[n]; }
+#endif
+
+ // operator version of GetWriteableChar
wxChar& operator[](size_t n)
{ ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; }
+#ifdef __alpha__
+ // operator version of GetWriteableChar
+ wxChar& operator[](unsigned int n)
+ { ASSERT_VALID_INDEX( n ); CopyBeforeWrite(); return m_pchData[n]; }
+#endif
// implicit conversion to C string
operator const wxChar*() const { return m_pchData; }
void clear() { Empty(); }
// returns true if the string is empty
bool empty() const { return IsEmpty(); }
+ // inform string about planned change in size
+ void reserve(size_t size) { Alloc(size); }
// lib.string.access
// return the character at position n