indented 0.1.0

Format data with indentation
Documentation
1
2
3
4
5
6
7
8
9
10
11
extern crate indented;

use indented::{indented_with, Tab};

fn main() {
    let x = "statement";
    // You can use the zero-sized Tab struct
    let y = format!("nested {{\n{};\n}}", indented_with(x, Tab));
    // Or just use the character, or even the static str equivalent
    println!("block {{\n{};\n{}\n}}", indented_with(x, '\t'), indented_with(&y, "\t"));
}