Macro vector::indoc

source ·
indoc!() { /* proc-macro */ }
Expand description

Unindent and produce &'static str or &'static [u8].

Supports normal strings, raw strings, bytestrings, and raw bytestrings.

§Example

// The type of `program` is &'static str
let program = indoc! {"
    def hello():
        print('Hello, world!')

    hello()
"};
print!("{}", program);
def hello():
    print('Hello, world!')

hello()