textwrap-macros 0.3.0

Simple procedural macros to use textwrap utilities at compile time.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg_attr(not(feature = "std"), no_std)]

#[macro_use]
extern crate textwrap_macros;

#[test]
fn test_constant() {
    const X: &str = dedent!("\t\tabc\n\tdef\n\t");
    const Y: &str = "\tabc\ndef\n";
    assert_eq!(X, Y);
}

#[test]
fn test_static() {
    static X: &str = dedent!("\t\tabc\n\tdef\n\t");
    static Y: &str = "\tabc\ndef\n";
    assert_eq!(X, Y);
}