Add C++20-style starts_with()/ends_with() functions to wxString
C++20 introduces these two functions, along with some overloads, to std::string. Add similar functions to wxString, which simply call the already existing StartsWith() and EndsWith(). Closes https://github.com/wxWidgets/wxWidgets/pull/1452
This commit is contained in:
committed by
Vadim Zeitlin
parent
a8c4cbee09
commit
4739b9dedd
@@ -1711,6 +1711,14 @@ public:
|
||||
wxString substr(size_t nStart = 0, size_t nLen = npos) const;
|
||||
void swap(wxString& str);
|
||||
|
||||
bool starts_with(const wxString &str) const;
|
||||
bool starts_with(const char *sz) const;
|
||||
bool starts_with(const wchar_t *sz) const;
|
||||
|
||||
bool ends_with(const wxString &str) const;
|
||||
bool ends_with(const char *sz) const;
|
||||
bool ends_with(const wchar_t *sz) const;
|
||||
|
||||
//@}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user