X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/110c50944f08b0e52313c57d4f10a5f1d0923227..5b88a837ba75928cd3835a6b97ae2bf5ad983a6e:/interface/wx/filename.h diff --git a/interface/wx/filename.h b/interface/wx/filename.h index fcec353020..72bf9273e8 100644 --- a/interface/wx/filename.h +++ b/interface/wx/filename.h @@ -1137,6 +1137,28 @@ public: wxString* path, wxPathFormat format = wxPATH_NATIVE); + + /** + Strip the file extension. + + This function does more than just removing everything after the last + period from the string, for example it will return the string ".vimrc" + unchanged because the part after the period is not an extension but the + file name in this case. You can use wxString::BeforeLast() to really + get just the part before the last period (but notice that that function + returns empty string if period is not present at all unlike this + function which returns the @a fullname unchanged in this case). + + @param fullname + File path including name and, optionally, extension. + + @return + File path without extension + + @since 2.9.0 + */ + static wxString StripExtension(const wxString& fullname); + /** Sets the access and modification times to the current moment. */