[−][src]Macro slash_formatter::concat_with_file_separator
Concatenate multiple strings with FILE_SEPARATORs.
#[macro_use] extern crate slash_formatter; if cfg!(windows) { assert_eq!(r"path\to\file", concat_with_file_separator!("path", r"to\", r"\file\")); let s = String::from("path"); let s = concat_with_file_separator!(s, r"to\", r"\file\"); assert_eq!(r"path\to\file", s); } else { assert_eq!("path/to/file", concat_with_file_separator!("path", "to/", "/file/")); let s = String::from("path"); let s = concat_with_file_separator!(s, "to/", "/file/"); assert_eq!("path/to/file", s); }