X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fadc2df6823d988f7a264b94e69a7e1bbcac1337..4e878f44abee3e03cf981772e9c623f0c16408c9:/interface/wx/string.h diff --git a/interface/wx/string.h b/interface/wx/string.h index 47c020601b..ed2afa915f 100644 --- a/interface/wx/string.h +++ b/interface/wx/string.h @@ -493,22 +493,22 @@ public: /** 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. @@ -741,7 +741,7 @@ public: /** 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. @@ -880,15 +880,14 @@ public: 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. @@ -906,14 +905,14 @@ public: 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); //@{ /** @@ -928,7 +927,7 @@ public: /** Removes the last character. */ - wxString RemoveLast(); + wxString& RemoveLast(size_t n = 1); /** Replace first (or all) occurrences of substring with another one. @@ -952,7 +951,7 @@ public: 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 @@ -1016,7 +1015,7 @@ public: @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 @@ -1034,7 +1033,7 @@ public: @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 @@ -1045,7 +1044,7 @@ public: @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. @@ -1062,14 +1061,14 @@ public: @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; //@{ /** @@ -1138,7 +1137,7 @@ public: @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 @@ -1199,22 +1198,23 @@ public: */ 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); @@ -1223,6 +1223,7 @@ public: wxString& operator<<(wxULongLong_t ul); wxString& operator<<(float f); wxString& operator<<(double d); + //@} /** Same as Mid() (substring extraction).