macro_rules! slash_in_place {
() => { ... };
($s:expr $(, $sc:expr)* $(,)*) => { ... };
}
Expand description
Concatenate multiple strings with slashes. It can also be used to get the literal '/'
.
let mut s = String::from("path");
slash_formatter::slash_in_place!(&mut s, "to/", "/file/");
assert_eq!("path/to/file", s);