Skip to main content

with_extension

Function with_extension 

Source
pub fn with_extension<P: AsRef<Path>>(path: P, new_ext: &str) -> PathBuf
Expand description

Replace the extension of path with new_ext. If new_ext is empty the extension (and its leading .) is removed.