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