added forward compatible wxFileName::StripExtension() (see #10634)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-03-26 15:59:38 +00:00
parent 5c892e9a01
commit 71d1ad8b40
3 changed files with 20 additions and 0 deletions

View File

@@ -91,6 +91,12 @@ Major new features in 2.8 release
2.8.11:
-------
All:
- Added several functions forward compatible with wxWidgets 3.0 (troelsk):
wxDC::SetDeviceClippingRegion(), wxShowEvent::IsShown(),
wxIconizeEvent::IsIconized(), wxFileName::StripExtension().
All (GUI):
- Add wxBU_EXACTFIT support to wxToggleButton XRC handler (Ronny Krueger).

View File

@@ -481,6 +481,12 @@ public:
wxString *path,
wxPathFormat format = wxPATH_NATIVE);
#if wxABI_VERSION >= 20811
// strip the file extension
static wxString StripExtension(const wxString& fullpath);
#endif // wxABI_VERSION >= 20811
// Filesize
// returns the size of the given filename

View File

@@ -2139,6 +2139,14 @@ void wxFileName::SplitPath(const wxString& fullpath,
}
}
/* static */
wxString wxFileName::StripExtension(const wxString& fullpath)
{
wxFileName fn(fullpath);
fn.SetExt("");
return fn.GetFullPath();
}
// ----------------------------------------------------------------------------
// time functions
// ----------------------------------------------------------------------------