1 unstable release
0.1.2 | May 30, 2023 |
---|
#1574 in Text processing
46KB
1K
SLoC
seven_seg
Pseudo seven segment digital display.
Examples
use seven_seg::sevseg_four;
let four_digits = sevseg_four("8023").unwrap();
assert_eq!(&four_digits, "┏━━━┓ ┏━━━┓ ╺━━━┓ ╺━━━┓\n\
┃ ┃ ┃ ┃ ┃ ┃\n\
┣━━━┫ ┃ ┃ ┏━━━┛ ╺━━━┫\n\
┃ ┃ ┃ ┃ ┃ ┃\n\
┗━━━┛ ┗━━━┛ ┗━━━╸ ╺━━━┛\n"
);
Example cpu_freg.rs from the examples folder.
License
GNU General Public License v3.0
lib.rs
:
Pseudo seven segment digital display.
One, two, three and four digits. One digit, it can be a string of numbers from zero to nine or a dash no value.
Examples
let four_digits = sevseg_four("8023").unwrap();
assert_eq!(&four_digits, "┏━━━┓ ┏━━━┓ ╺━━━┓ ╺━━━┓\n\
┃ ┃ ┃ ┃ ┃ ┃\n\
┣━━━┫ ┃ ┃ ┏━━━┛ ╺━━━┫\n\
┃ ┃ ┃ ┃ ┃ ┃\n\
┗━━━┛ ┗━━━┛ ┗━━━╸ ╺━━━┛\n"
);
Dependencies
~400KB