Add wxHtmlTag::GetParamAsString() convenience method.
This is more convenient to use than HasParam() + GetParam() and also slightly more efficient as we search for the tag name only once. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -511,6 +511,19 @@ wxString wxHtmlTag::GetParam(const wxString& par, bool with_quotes) const
|
||||
return m_ParamValues[index];
|
||||
}
|
||||
|
||||
bool wxHtmlTag::GetParamAsString(const wxString& par, wxString *str) const
|
||||
{
|
||||
wxCHECK_MSG( str, false, wxT("NULL output string argument") );
|
||||
|
||||
int index = m_ParamNames.Index(par, false);
|
||||
if (index == wxNOT_FOUND)
|
||||
return false;
|
||||
|
||||
*str = m_ParamValues[index];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxHtmlTag::ScanParam(const wxString& par,
|
||||
const char *format,
|
||||
void *param) const
|
||||
|
||||
Reference in New Issue
Block a user