Function slash_formatter::concat_with_file_separator
source · Expand description
Concatenate two strings with a FILE_SEPARATOR.
extern crate slash_formatter;
if cfg!(windows) {
assert_eq!(r"path\to", slash_formatter::concat_with_file_separator("path", r"to\"));
} else {
assert_eq!("path/to", slash_formatter::concat_with_file_separator("path", "to/"));
}