linurgy
Rust library to manipulate multiple newlines. Works with stdin and stdout, files, and buffers. No dependencies.
Linurgy provides an interface for manipulating multiple newlines in text.
Interaction with this library happens through LinurgyBuilder
.
Examples
Read stdin and for each empty line, append an extra line to stdout.
use LinurgyBuilder;
new
.set_newline_trigger
.set_new_text
.run;
Read from one buffer, remove all empty lines, and output to another buffer.
use ;
let input = String from;
let mut output = String new;
new
.set_input
.set_output
.set_newline_trigger
.set_edit_type
.set_new_text
.run;
assert_eq!;