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