added wxRegEx::GetMatch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-13 17:10:00 +00:00
parent e7208277c1
commit 00e6c2bd41
2 changed files with 21 additions and 2 deletions

View File

@@ -315,6 +315,15 @@ bool wxRegEx::GetMatch(size_t *start, size_t *len, size_t index) const
return m_impl->GetMatch(start, len, index);
}
wxString wxRegEx::GetMatch(const wxString& text, size_t index) const
{
size_t start, len;
if ( !GetMatch(&start, &len, index) )
return wxEmptyString;
return text.Mid(start, len);
}
int wxRegEx::Replace(wxString *pattern, const wxString& replacement) const
{
wxCHECK_MSG( IsValid(), -1, _T("must successfully Compile() first") );