/**
Appends the wide string literal @e pwz.
*/
- wxString& Append(const wchar_t* pwz)
+ wxString& Append(const wchar_t* pwz);
/**
Appends the string literal @e psz with max length @e nLen.
*/
- wxString& Append(const wchar_t* pwz);
+ wxString& Append(const char* psz, size_t nLen);
/**
Appends the wide string literal @e psz with max length @e nLen.
*/
- wxString& Append(const wchar_t* pwz, size_t nLen)
+ wxString& Append(const wchar_t* pwz, size_t nLen);
/**
Appends the string @e s.
*/
- wxString& Append(const wchar_t* pwz, size_t nLen);
+ wxString& Append(const wxString& s);
/**
Appends the character @e ch @e count times.
/**
wxWidgets compatibility conversion. Same as c_str().
*/
- const wxCStrData* GetData() const;
+ const wxCStrData GetData() const;
/**
Returns a reference to the character at position @e n.
Returns a substring starting at @e first, with length @e count, or the rest of
the string if @a count is the default value.
*/
- wxString Mid(size_t first, size_t count = wxSTRING_MAXLEN) const;
+ wxString Mid(size_t first, size_t nCount = wxString::npos) const;
/**
Adds @a count copies of @a pad to the beginning, or to the end of the
string (the default). Removes spaces from the left or from the right (default).
*/
- wxString& Pad(size_t count, wxUniChar pad = ' ',
- bool fromRight = true);
+ wxString& Pad(size_t count, wxUniChar chPad = ' ', bool fromRight = true);
/**
Prepends @a str to this string, returning a reference to this string.
size. Unfortunately, this function is not available on all platforms and the
dangerous @e vsprintf() will be used then which may lead to buffer overflows.
*/
- int Printf(const wxChar* pszFormat, ...);
+ int Printf(const wxString& pszFormat, ...);
/**
Similar to vprintf. Returns the number of characters written, or an integer
less than zero
on error.
*/
- int PrintfV(const wxChar* pszFormat, va_list argPtr);
+ int PrintfV(const wxString& pszFormat, va_list argPtr);
//@{
/**
/**
Removes the last character.
*/
- wxString RemoveLast();
+ wxString& RemoveLast(size_t n = 1);
/**
Replace first (or all) occurrences of substring with another one.
Minimizes the string's memory. This can be useful after a call to
Alloc() if too much memory were preallocated.
*/
- void Shrink();
+ bool Shrink();
/**
This function can be used to test if the string starts with the specified
@see ToLong(), ToULong()
*/
- bool ToDouble(double val) const;
+ bool ToDouble(double* val) const;
/**
Attempts to convert the string to a signed integer in base @e base. Returns
@see ToDouble(), ToULong()
*/
- bool ToLong(long val, int base = 10) const;
+ bool ToLong(long* val, int base = 10) const;
/**
This is exactly the same as ToLong() but works with 64
@see ToLong(), ToULongLong()
*/
- bool ToLongLong(wxLongLong_t val, int base = 10) const;
+ bool ToLongLong(wxLongLong_t* val, int base = 10) const;
/**
Attempts to convert the string to an unsigned integer in base @e base.
@see ToDouble(), ToLong()
*/
- bool ToULong(unsigned long val, int base = 10) const;
+ bool ToULong(unsigned long* val, int base = 10) const;
/**
This is exactly the same as ToULong() but works with 64
bit integer numbers.
Please see ToLongLong() for additional remarks.
*/
- bool ToULongLong(wxULongLong_t val, int base = 10) const;
+ bool ToULongLong(wxULongLong_t* val, int base = 10) const;
//@{
/**
@see wc_str(), utf8_str(), c_str(), mb_str(), fn_str()
*/
- const wxCStrData c_str() const;
+ wxCStrData c_str() const;
/**
Returns an object with string data that is implicitly convertible to
*/
friend istream operator>>(istream& is, wxString& str);
+ //@{
/**
These functions work as C++ stream insertion operators. They insert the
given value into the string. Precision and format cannot be set using them.
Use Printf() instead.
*/
wxString& operator<<(const wxString& s);
- wxString& operator<<(const char* psz)
- wxString& operator<<(const wchar_t* pwz)
- wxString& operator<<(const wxCStrData& psz)
wxString& operator<<(const char* psz);
- wxString& operator<<(wxUniCharRef ch)
- wxString& operator<<(char ch)
- wxString& operator<<(unsigned char ch)
- wxString& operator<<(wchar_t ch)
- wxString& operator<<(const wxCharBuffer& s)
- wxString& operator<<(const wxWCharBuffer& s)
+ wxString& operator<<(const wchar_t* pwz);
+ wxString& operator<<(const wxCStrData& psz);
+ wxString& operator<<(const char* psz);
+ wxString& operator<<(wxUniCharRef ch);
+ wxString& operator<<(char ch);
+ wxString& operator<<(unsigned char ch);
+ wxString& operator<<(wchar_t ch);
+ wxString& operator<<(const wxCharBuffer& s);
+ wxString& operator<<(const wxWCharBuffer& s);
wxString& operator<<(wxUniCharRef ch);
wxString& operator<<(unsigned int ui);
wxString& operator<<(long l);
wxString& operator<<(wxULongLong_t ul);
wxString& operator<<(float f);
wxString& operator<<(double d);
+ //@}
/**
Same as Mid() (substring extraction).