1 unstable release
Uses old Rust 2015
0.1.0 | Mar 21, 2018 |
---|
#1694 in Text processing
1,487 downloads per month
Used in 2 crates
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;
}
}