Macro slash_formatter::concat_with_file_separator_debug_release[][src]

macro_rules! concat_with_file_separator_debug_release {
    ($($t:tt)*) => { ... };
}

Concatenates literals into a static string slice separated by file separators which depends on the target OS if in debug mode, or depends on the workstation if in release mode. Prefixes and suffixes can also be added.

#[macro_use] extern crate slash_formatter;

if cfg!(debug_assertions) {
    assert_eq!(concat!("test", slash_formatter::file_separator!(), 10, slash_formatter::file_separator!(), 'b', slash_formatter::file_separator!(), true), concat_with_file_separator_debug_release!("test", 10, 'b', true));
}

if !cfg!(debug_assertions) {
    assert_eq!(concat!("test", slash_formatter::file_separator_build!(), 10, slash_formatter::file_separator_build!(), 'b', slash_formatter::file_separator_build!(), true), concat_with_file_separator_debug_release!("test", 10, 'b', true));
}