codize 0.2.0

A simple library for encoding nested code blocks
Documentation

codize

A simple library that helps with printing code as strings

use codize::{codeln, block};

let expected = r"
fn main() {
    foo();
}";

let code = block!("\nfn main() {", [
   codeln!("foo();"),
], "}");
assert_eq!(expected, code.to_string());