Function slash_formatter::delete_end_backslash_in_place
source · pub fn delete_end_backslash_in_place(s: &mut String)
Expand description
Delete an ending backslash in a string except for ‘\\’.
let mut s = String::from("path\\");
slash_formatter::delete_end_backslash_in_place(&mut s);
assert_eq!("path", s);