MCPcopy
hub / github.com/EngoEngine/engo / getExt

Function getExt

common/audio_filetype.go:125–133  ·  view source on GitHub ↗

getExt returns the extension of the file(including extensions with `.` in them) from the given url.

(path string)

Source from the content-addressed store, hash-verified

123
124// getExt returns the extension of the file(including extensions with `.` in them) from the given url.
125func getExt(path string) string {
126 ext := ""
127 for i := len(path) - 1; i >= 0 && !os.IsPathSeparator(path[i]); i-- {
128 if path[i] == '.' {
129 ext = path[i:]
130 }
131 }
132 return ext
133}

Callers 2

LoadMethod · 0.70
LoadMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected