pub fn concat_with_file_separator_owned<S1: Into<String>, S2: AsRef<str>>(
    s1: S1,
    s2: S2
) -> String
Expand description

Concatenate two strings with a FILE_SEPARATOR.

extern crate slash_formatter;

let s = String::from("path");

if cfg!(windows) {
    let s = slash_formatter::concat_with_file_separator_owned(s, r"to\");

    assert_eq!(r"path\to", s);
} else {
    let s = slash_formatter::concat_with_file_separator_owned(s, "to/");

    assert_eq!("path/to", s);
}