[−][src]Function slash_formatter::delete_end_file_separator_owned
pub fn delete_end_file_separator_owned<S: Into<String>>(s: S) -> String
Delete an ending FILE_SEPARATOR in a string except for the FILE_SEPARATOR.
extern crate slash_formatter; let s = if cfg!(windows) { String::from(r"path\") } else { String::from("path/") }; let s = slash_formatter::delete_end_file_separator_owned(s); assert_eq!("path", s);