1
0
Fork 0
hugo/docs/content/en/functions/path/Clean.md

759 B

title description categories keywords params aliases
path.Clean Replaces path separators with slashes (`/`) and returns the shortest path name equivalent to the given path.
functions_and_methods
aliases returnType signatures
string
path.Clean PATH
/functions/path.clean

See Go's path.Clean documentation for details.

{{ path.Clean "foo/bar" }} → foo/bar
{{ path.Clean "/foo/bar" }} → /foo/bar
{{ path.Clean "/foo/bar/" }} → /foo/bar
{{ path.Clean "/foo//bar/" }} → /foo/bar
{{ path.Clean "/foo/./bar/" }} → /foo/bar
{{ path.Clean "/foo/../bar/" }} → /bar
{{ path.Clean "/../foo/../bar/" }} → /bar
{{ path.Clean "" }} → .