Function slash_formatter::concat_with_file_separator_mut
source · Expand description
Concatenate two strings with a FILE_SEPARATOR.
extern crate slash_formatter;
let mut s = String::from("path");
if cfg!(windows) {
slash_formatter::concat_with_file_separator_mut(&mut s, r"to\");
assert_eq!(r"path\to", s);
} else {
slash_formatter::concat_with_file_separator_mut(&mut s, "to/");
assert_eq!("path/to", s);
}