Function code128::modules_to_blocks

source ·
pub fn modules_to_blocks(modules: impl IntoIterator<Item = Module>) -> String
Expand description

Create a string representation of the modules using Unicode block characters.

The quiet zones are included.

Example

assert_eq!(
    modules_to_blocks(Code128::encode(b"<3").modules()),
    "     █▐ ▌ ▐█ █▐ █ ▌█▌▐  ▌█ █ ▐█▐▐▌     ",
);