#human-readable #displaying #balanced #format #pretty

pretty_balanced

A library for displaying code in human-readable format

1 unstable release

0.1.0 Apr 28, 2019

#293 in Value formatting

MIT license

3KB

pretty_balanced

A library for displaying code in human-readable format.

Example

use pretty_balanced::PrettyBalanced;

fn main() {
    println!("{}", "if 3 { foo; bar } else { baz }".pretty_balanced());
}

Output:

if 3 {
     foo;
     bar
} else {
     baz
}

The formatting simply inserts newline and indentation after (){}[]<>; characters.

No runtime deps