X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e723ee9439b95da838be3ef7ebb0be2840988b0e..d8efd2198ff050ca5a5726bcad0f42692fe872df:/interface/wx/string.h?ds=sidebyside diff --git a/interface/wx/string.h b/interface/wx/string.h index a88ae09f14..80f58699d1 100644 --- a/interface/wx/string.h +++ b/interface/wx/string.h @@ -488,26 +488,6 @@ public: */ int CmpNoCase(const wxString& s) const; - - //@{ - /** - Comparison operators - */ - bool operator ==(const wxString& x, const wxString& y); - bool operator ==(const wxString& x, wxUniChar ch); - bool operator !=(const wxString& x, const wxString& y); - bool operator !=(const wxString& x, wxUniChar ch); - bool operator(const wxString& x, const wxString& y); - bool operator(const wxString& x, wxUniChar ch); - bool operator =(const wxString& x, const wxString& y); - bool operator =(const wxString& x, wxUniChar ch); - bool operator(const wxString& x, const wxString& y); - bool operator(const wxString& x, wxUniChar ch); - bool operator =(const wxString& x, const wxString& y); - bool operator =(const wxString& x, wxUniChar ch); - //@} - - /** Returns @true if target appears anywhere in wxString; else @false. This is a wxWidgets 1.xx compatibility function; you should not use it in new @@ -559,7 +539,7 @@ public: @see FormatV(), Printf() */ - static wxString Format(const wxChar format, ...); + static wxString Format(const wxString& format, ...); /** This static function returns the string containing the result of calling @@ -567,7 +547,7 @@ public: @see Format(), PrintfV() */ - static wxString FormatV(const wxChar format, va_list argptr); + static wxString FormatV(const wxString& format, va_list argptr); /** Returns the number of occurrences of @e ch in the string. @@ -1119,8 +1099,6 @@ public: 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); @@ -1161,7 +1139,7 @@ public: //@{ /** Assignment: the effect of each operation is the same as for the corresponding - constructor (see @ref wxString() "wxString constructors"). + constructor (see wxString constructors). */ wxString operator =(const wxString& str); wxString operator =(wxUniChar c); @@ -1368,6 +1346,53 @@ public: //@} }; +/** @addtogroup group_string_operators */ +//@{ +/** + Comparison operators for wxString. +*/ +inline bool operator==(const wxString& s1, const wxString& s2); +inline bool operator!=(const wxString& s1, const wxString& s2); +inline bool operator< (const wxString& s1, const wxString& s2); +inline bool operator> (const wxString& s1, const wxString& s2); +inline bool operator<=(const wxString& s1, const wxString& s2); +inline bool operator>=(const wxString& s1, const wxString& s2); +inline bool operator==(const wxString& s1, const wxCStrData& s2); +inline bool operator==(const wxCStrData& s1, const wxString& s2); +inline bool operator!=(const wxString& s1, const wxCStrData& s2); +inline bool operator!=(const wxCStrData& s1, const wxString& s2); +inline bool operator==(const wxString& s1, const wxWCharBuffer& s2); +inline bool operator==(const wxWCharBuffer& s1, const wxString& s2); +inline bool operator!=(const wxString& s1, const wxWCharBuffer& s2); +inline bool operator!=(const wxWCharBuffer& s1, const wxString& s2); +inline bool operator==(const wxString& s1, const wxCharBuffer& s2); +inline bool operator==(const wxCharBuffer& s1, const wxString& s2); +inline bool operator!=(const wxString& s1, const wxCharBuffer& s2); +inline bool operator!=(const wxCharBuffer& s1, const wxString& s2); + +/** + Comparison operators with wxUniChar or wxUniCharRef. +*/ +inline bool operator==(const wxUniChar& c, const wxString& s); +inline bool operator==(const wxUniCharRef& c, const wxString& s); +inline bool operator==(char c, const wxString& s); +inline bool operator==(wchar_t c, const wxString& s); +inline bool operator==(int c, const wxString& s); +inline bool operator==(const wxString& s, const wxUniChar& c); +inline bool operator==(const wxString& s, const wxUniCharRef& c); +inline bool operator==(const wxString& s, char c); +inline bool operator==(const wxString& s, wchar_t c); +inline bool operator!=(const wxUniChar& c, const wxString& s); +inline bool operator!=(const wxUniCharRef& c, const wxString& s); +inline bool operator!=(char c, const wxString& s); +inline bool operator!=(wchar_t c, const wxString& s); +inline bool operator!=(int c, const wxString& s); +inline bool operator!=(const wxString& s, const wxUniChar& c); +inline bool operator!=(const wxString& s, const wxUniCharRef& c); +inline bool operator!=(const wxString& s, char c); +inline bool operator!=(const wxString& s, wchar_t c); +//@} + /** The global wxString instance of an empty string. Used extensively in the entire wxWidgets API.