]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
correction to last commit: Korean and Romanian translations will only be in 2.9.1...
[wxWidgets.git] / src / common / filefn.cpp
index b732f23a1c869cbd02541ce34ca67ba755ff50dc..ca0d92a8632fe3c6a28548749b68eff1b8bf1eac 100644 (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