[−][src]Function slash_formatter::delete_end_file_separator
pub fn delete_end_file_separator<'a, S: ?Sized + AsRef<str> + 'a>(
s: &'a S
) -> &'a str
Delete an ending FILE_SEPARATOR in a string except for the FILE_SEPARATOR.
extern crate slash_formatter; if cfg!(windows) { assert_eq!("path", slash_formatter::delete_end_file_separator(r"path\")); } else { assert_eq!("path", slash_formatter::delete_end_file_separator("path/")); }