[][src]Function slash_formatter::concat_with_file_separator_mut

pub fn concat_with_file_separator_mut<S2: AsRef<str>>(s1: &mut String, s2: S2)

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);
}