[][src]Function slash_formatter::delete_start_file_separator

pub fn delete_start_file_separator<'a, S: ?Sized + AsRef<str> + 'a>(
    s: &'a S
) -> &'a str

Delete a starting FILE_SEPARATOR in a string except for the FILE_SEPARATOR.

extern crate slash_formatter;

if cfg!(windows) {
    assert_eq!("path", slash_formatter::delete_start_file_separator(r"\path"));
} else {
    assert_eq!("path", slash_formatter::delete_start_file_separator("/path"));
}