method
Path.ext
Path.ext(p) -> string
Returns the extension of the final component, including the leading dot (e.g. ".json"), or the empty string when there is none. A leading-dot name (a dotfile like .gitignore) has no extension.
Parameters
pthe pathExample
program Ext {
entry {
if Path.ext("hero.png") == ".png" { print(1) }
}
}