3 unstable releases
0.1.1 | May 8, 2021 |
---|---|
0.1.0 | Apr 8, 2021 |
0.0.0 | Apr 8, 2021 |
#2067 in Rust patterns
4,137 downloads per month
Used in 10 crates
(4 directly)
4KB
Text Block Macros
Create a multiline string literal.
Usage Examples
Create a block of text without final newline
use text_block_macros::text_block;
let text = text_block! {
"abc"
"def"
"ghi"
};
assert_eq!(text, "abc\ndef\nghi");
Create a block of text that ends with a newline
use text_block_macros::text_block_fnl;
let text = text_block_fnl! {
"abc"
"def"
"ghi"
};
assert_eq!(text, "abc\ndef\nghi\n");