Created
Some checks failed
Go / build (push) Failing after 7s

This commit is contained in:
scheibling
2025-04-08 19:16:39 +02:00
commit b4eb50ab55
63 changed files with 7333 additions and 0 deletions

18
pathx/path.go Normal file
View File

@@ -0,0 +1,18 @@
package pathx
import (
"path"
"strings"
)
func FilenameWithoutExt(s string) string {
if s == "" {
return ""
}
filename := path.Base(s)
if ext := path.Ext(s); ext != "" {
filename = strings.TrimSuffix(filename, ext)
}
return filename
}