Add wxRegEx::QuoteMeta() helper

Quote all characters special for wxRegEx in the given string: this can
be useful when searching for a literal string using wxRegEx.

Closes https://github.com/wxWidgets/wxWidgets/pull/1489
This commit is contained in:
Tomay
2019-08-24 22:26:50 +01:00
committed by Vadim Zeitlin
parent 363cdc5fdc
commit 050ca4ce3a
4 changed files with 62 additions and 0 deletions

View File

@@ -142,6 +142,8 @@ public:
int ReplaceAll(wxString *text, const wxString& replacement) const
{ return Replace(text, replacement, 0); }
static wxString QuoteMeta(const wxString& str);
// dtor not virtual, don't derive from this class
~wxRegEx();