*/
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
@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
@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.
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);
//@{
/**
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);
size_t find_first_of(const wchar_t* sz, size_t nStart = 0) const;
size_t find_first_of(const char* sz, size_t nStart, size_t n) const;
size_t find_first_of(const wchar_t* sz, size_t nStart, size_t n) const;
- size_t find_first_of(wxUniChar c, size_t nStart = 0) const
- size_t find_last_of (const wxString& str, size_t nStart = npos) const
+ size_t find_first_of(wxUniChar c, size_t nStart = 0) const;
+ size_t find_last_of (const wxString& str, size_t nStart = npos) const;
size_t find_last_of (const char* sz, size_t nStart = npos) const;
size_t find_last_of (const wchar_t* sz, size_t nStart = npos) const;
size_t find_last_of(const char* sz, size_t nStart, size_t n) const;
size_t find_last_of(const wchar_t* sz, size_t nStart, size_t n) const;
- size_t find_last_of(wxUniChar c, size_t nStart = npos) const
- size_t find_first_not_of(const wxString& str, size_t nStart = 0) const
+ size_t find_last_of(wxUniChar c, size_t nStart = npos) const;
+ size_t find_first_not_of(const wxString& str, size_t nStart = 0) const;
size_t find_first_not_of(const char* sz, size_t nStart = 0) const;
size_t find_first_not_of(const wchar_t* sz, size_t nStart = 0) const;
size_t find_first_not_of(const char* sz, size_t nStart, size_t n) const;
size_t find_first_not_of(const wchar_t* sz, size_t nStart, size_t n) const;
size_t find_first_not_of(wxUniChar ch, size_t nStart = 0) const;
- size_t find_last_not_of(const wxString& str, size_t nStart = npos) const
+ size_t find_last_not_of(const wxString& str, size_t nStart = npos) const;
size_t find_last_not_of(const char* sz, size_t nStart = npos) const;
size_t find_last_not_of(const wchar_t* sz, size_t nStart = npos) const;
size_t find_last_not_of(const char* sz, size_t nStart, size_t n) const;
wxString& replace(size_t nStart, size_t nLen, const wxString& str);
wxString& replace(size_t nStart, size_t nLen, size_t nCount, wxUniChar ch);
wxString& replace(size_t nStart, size_t nLen,
- const wxString& str, size_t nStart2, size_t nLen2);
+ const wxString& str, size_t nStart2, size_t nLen2);
wxString& replace(size_t nStart, size_t nLen,
- const char* sz, size_t nCount);
+ const char* sz, size_t nCount);
wxString& replace(size_t nStart, size_t nLen,
- const wchar_t* sz, size_t nCount);
+ const wchar_t* sz, size_t nCount);
wxString& replace(size_t nStart, size_t nLen,
- const wxString& s, size_t nCount);
+ const wxString& s, size_t nCount);
wxString& replace(iterator first, iterator last, const wxString& s);
wxString& replace(iterator first, iterator last, const char* s, size_type n);
wxString& replace(iterator first, iterator last, const wchar_t* s, size_type n);
wxString& replace(iterator first, iterator last, size_type n, wxUniChar ch);
wxString& replace(iterator first, iterator last,
- const_iterator first1, const_iterator last1);
+ const_iterator first1, const_iterator last1);
wxString& replace(iterator first, iterator last,
- const char *first1, const char *last1);
+ const char *first1, const char *last1);
wxString& replace(iterator first, iterator last,
- const wchar_t *first1, const wchar_t *last1);
+ const wchar_t *first1, const wchar_t *last1);
size_t rfind(const wxString& str, size_t nStart = npos) const;
size_t rfind(const char* sz, size_t nStart = npos, size_t n = npos) const;
//@}
};
+/** @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.