pub fn delete_end_file_separator(s: &str) -> &str
Expand description

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/"));
}