Macro slash_formatter::file_separator_build [−][src]
macro_rules! file_separator_build { ($($t:tt)*) => { ... }; }
Concatenate multiple strings with FILE_SEPARATOR_ON_WORKSTATION
. It can also be used to get the literal FILE_SEPARATOR_ON_WORKSTATION
.
#[macro_use] extern crate slash_formatter; assert_eq!(slash_formatter::concat_with_file_separator_build!("path", "to", "file"), file_separator_build!("path", concat!("to", slash_formatter::file_separator_build!()), concat!(slash_formatter::file_separator_build!(), "file", slash_formatter::file_separator_build!()))); let s = String::from("path"); let s = file_separator_build!(s, concat!("to", slash_formatter::file_separator_build!()), concat!(slash_formatter::file_separator_build!(), "file", slash_formatter::file_separator_build!())); assert_eq!(slash_formatter::concat_with_file_separator_build!("path", "to", "file"), s);