You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example:
http://play.golang.org/p/cJNuTP6nJN
My example implementation of the function:
func removeExtension(filename string) string {
return filename[0:len(filename)-len(path.Ext(filename))]
}
In Python this works like this:
>>> import os
>>> os.path.splitext("/a/b/foo.ogg")
('/a/b/foo', '.ogg')
>>> os.path.splitext("/a/b/foo.")
('/a/b/foo', '.')
>>> os.path.splitext("/a/b/foo")
('/a/b/foo', '')
Can we have something like this in the path pkg?
The text was updated successfully, but these errors were encountered:
by superjoe30:
The text was updated successfully, but these errors were encountered: