4 releases (2 breaking)
new 0.2.0 | Oct 29, 2024 |
---|---|
0.1.2 |
|
0.1.1 | May 8, 2021 |
0.1.0 | Apr 8, 2021 |
0.0.0 | Apr 8, 2021 |
#328 in Rust patterns
3,172 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");