implement deprecated wxStripExtension() in terms of new wxFileName::StripExtension() (closes #10634)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-03-26 15:55:01 +00:00
parent 62714742f3
commit 181dd701fa
6 changed files with 42 additions and 37 deletions

View File

@@ -384,16 +384,7 @@ void wxStripExtension(wchar_t *buffer) { wxDoStripExtension(buffer); }
void wxStripExtension(wxString& buffer)
{
//RN: Be careful about the handling the case where
//buffer.length() == 0
for(size_t i = buffer.length() - 1; i != wxString::npos; --i)
{
if (buffer.GetChar(i) == wxT('.'))
{
buffer = buffer.Left(i);
break;
}
}
buffer = wxFileName::StripExtension(buffer);
}
// Destructive removal of /./ and /../ stuff