OxL Reference

method Path.extension

Extension of the file name without the dot (a.tar.gz -> gz); empty if none; .bashrc has none.

Example:

oxl✓ checked in CI
use std.io { Path }

fn main() io {
  print(Path.of("/src/main.oxl").extension())
}
Output
oxl
pub(api) fn extension() -> str

Since. 1.0.0-beta

Returns

str

Effects

none declared (pure unless the body says otherwise)

Defined in: std/io/io.oxl:936

See also