Created
June 29, 2022 13:51
-
-
Save malobre/f94b62b004b8b4305b4139f7f04a85e3 to your computer and use it in GitHub Desktop.
Flattens literals into a single static string slice, placing a newline between each element.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Flattens literals into a single static string slice, placing a newline between each element. | |
macro_rules! joinln { | |
($head:expr, $($e:expr),* $(,)?) => { | |
concat!($head, $('\n', $e, )*) | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment