Crate pure_lines[][src]

Expand description

A tool that beautify multiple lines.

Basic example

let doc = " \t\n    hello\n    world!";
assert_eq!(pure_lines::pure(doc),String::from("hello\nworld!"));

Example with prefix

let doc = " \t\n    hello\n    world!";
assert_eq!(pure_lines::pure_with(doc,"> "),String::from("> hello\n> world!"));

Functions

Trim first line if empty, and trim min indent.

Trim first line if empty, and trim min indent, and add prefix to every lines.