Function slash_formatter::delete_start_file_separator_mut
source · pub fn delete_start_file_separator_mut(s: &mut String)
Expand description
Delete a starting FILE_SEPARATOR in a string except for the FILE_SEPARATOR.
extern crate slash_formatter;
let mut s = if cfg!(windows) {
String::from(r"\path")
} else {
String::from("/path")
};
slash_formatter::delete_start_file_separator_mut(&mut s);
assert_eq!("path", s);