1 unstable release

Uses old Rust 2015

0.1.0 Mar 21, 2018

#1694 in Text processing

Download history 362/week @ 2024-04-07 253/week @ 2024-04-14 168/week @ 2024-04-21 321/week @ 2024-04-28 466/week @ 2024-05-05 361/week @ 2024-05-12 327/week @ 2024-05-19 162/week @ 2024-05-26 288/week @ 2024-06-02 191/week @ 2024-06-09 514/week @ 2024-06-16 376/week @ 2024-06-23 483/week @ 2024-06-30 284/week @ 2024-07-07 400/week @ 2024-07-14 318/week @ 2024-07-21

1,487 downloads per month
Used in 2 crates

Custom license

7KB
123 lines

indented

Format data with indentation

[dependencies]
indented = "0.1.0"
extern crate indented;

use indented::indented;

fn main() {
    let x = "statement";
    let y = format!("nested {{\n{};\n}}", indented(&x));
    println!("block {{\n{};\n{}\n}}", indented(&x), indented(&y));
}

Output:

block {
    statement;
    nested {
        statement;
    }
}

No runtime deps