pretty_balanced 0.1.0

A library for displaying code in human-readable format.
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 3 items with examples
  • Size
  • Source code size: 3.84 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.37 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • segeljakt/pretty_balanced
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • segeljakt

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.