X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9630cac5fc5b4c415807231b450f3065b4fa728a..a9c95884805a56442482036cd204e56c47a03d2c:/src/common/regex.cpp diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 2e0068f0a3..33458574c9 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -249,7 +249,7 @@ wxString wxRegExImpl::GetErrorMsg(int errorcode, bool badconv) const (void)wx_regerror(errorcode, &m_RegEx, szcmbError, len); - szError = wxConvertMB2WX(szcmbError); + szError = wxConvLibc.cMB2WX(szcmbError); delete [] szcmbError; } else // regerror() returned 0 @@ -634,21 +634,12 @@ bool wxRegEx::Compile(const wxString& expr, int flags) return true; } -bool wxRegEx::Matches(const wxChar *str, int flags, size_t len) const +bool wxRegEx::Matches(const wxString& str, int flags) const { wxCHECK_MSG( IsValid(), false, _T("must successfully Compile() first") ); - (void)len; - return m_impl->Matches(WXREGEX_CHAR(str), flags WXREGEX_IF_NEED_LEN(len)); -} - -bool wxRegEx::Matches(const wxChar *str, int flags) const -{ - wxCHECK_MSG( IsValid(), false, _T("must successfully Compile() first") ); - - return m_impl->Matches(WXREGEX_CHAR(str), - flags - WXREGEX_IF_NEED_LEN(wxStrlen(str))); + return m_impl->Matches(WXREGEX_CHAR(str), flags + WXREGEX_IF_NEED_LEN(str.length())); } bool wxRegEx::GetMatch(size_t *start, size_t *len, size_t index) const