4 releases (2 breaking)

0.2.0 Oct 29, 2024
0.1.2 Oct 29, 2024
0.1.1 May 8, 2021
0.1.0 Apr 8, 2021
0.0.0 Apr 8, 2021

#332 in Rust patterns

Download history 584/week @ 2024-10-09 805/week @ 2024-10-16 805/week @ 2024-10-23 1165/week @ 2024-10-30 605/week @ 2024-11-06 411/week @ 2024-11-13 784/week @ 2024-11-20 584/week @ 2024-11-27 985/week @ 2024-12-04 785/week @ 2024-12-11 566/week @ 2024-12-18 176/week @ 2024-12-25 600/week @ 2025-01-01 654/week @ 2025-01-08 1113/week @ 2025-01-15 5048/week @ 2025-01-22

7,441 downloads per month
Used in 10 crates (4 directly)

MIT license

4KB

Text Block Macros

Test Crates.io Version

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");

License

MIT © Hoàng Văn Khải.

No runtime deps