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:
@@ -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") );
|
||||
|
Reference in New Issue
Block a user