Crates.io | braille |
lib.rs | braille |
version | 1.0.3 |
source | src |
created_at | 2019-01-02 11:46:22.231492 |
updated_at | 2021-07-25 21:51:24.657478 |
description | Rust crate for generating Braille and box-drawing characters. |
homepage | https://github.com/segeljakt/braille |
repository | https://github.com/segeljakt/braille |
max_upload_size | |
id | 105002 |
size | 9,202 |
A library for generating braille and box-drawing characters.
This library exposes four arrays:
BRAILLE
- Contains all braille characters.BRAILLE_SINGLE
- Contains all single-dot braille characters.BOX
- Contains all box-drawing characters.BOX_SINGLE
- Contains all single-dot box-drawing characters.How these work is best explained with examples.
println!("{}", BRAILLE[1][0]
[0][1]
[1][0]
[1][1]);
Output: ⣕
println!("{}", BRAILLE_SINGLE[2][1]);
Output: ⠠
for a in 0..2 {
for b in 0..2 {
for c in 0..2 {
for d in 0..2 {
for e in 0..2 {
for f in 0..2 {
for g in 0..2 {
for h in 0..2 {
print!("{}", BRAILLE[a][b]
[c][d]
[e][f]
[g][h]);
}
}
}
}
}
}
}
}
println!("");
Output: ⢀⡀⣀⠠⢠⡠⣠⠄⢄⡄⣄⠤⢤⡤⣤⠐⢐⡐⣐⠰⢰⡰⣰⠔⢔⡔⣔⠴⢴⡴⣴⠂⢂⡂⣂⠢⢢⡢⣢⠆⢆⡆⣆⠦⢦⡦⣦⠒⢒⡒⣒⠲⢲⡲⣲⠖⢖⡖⣖⠶⢶⡶⣶⠈⢈⡈⣈⠨⢨⡨⣨⠌⢌⡌⣌⠬⢬⡬⣬⠘⢘⡘⣘⠸⢸⡸⣸⠜⢜⡜⣜⠼⢼⡼⣼⠊⢊⡊⣊⠪⢪⡪⣪⠎⢎⡎⣎⠮⢮⡮⣮⠚⢚⡚⣚⠺⢺⡺⣺⠞⢞⡞⣞⠾⢾⡾⣾⠁⢁⡁⣁⠡⢡⡡⣡⠅⢅⡅⣅⠥⢥⡥⣥⠑⢑⡑⣑⠱⢱⡱⣱⠕⢕⡕⣕⠵⢵⡵⣵⠃⢃⡃⣃⠣⢣⡣⣣⠇⢇⡇⣇⠧⢧⡧⣧⠓⢓⡓⣓⠳⢳⡳⣳⠗⢗⡗⣗⠷⢷⡷⣷⠉⢉⡉⣉⠩⢩⡩⣩⠍⢍⡍⣍⠭⢭⡭⣭⠙⢙⡙⣙⠹⢹⡹⣹⠝⢝⡝⣝⠽⢽⡽⣽⠋⢋⡋⣋⠫⢫⡫⣫⠏⢏⡏⣏⠯⢯⡯⣯⠛⢛⡛⣛⠻⢻⡻⣻⠟⢟⡟⣟⠿⢿⡿⣿
println!("{}", BOX[1][1]
[1][0]);
Output: ▛
println!("{}", BOX_SINGLE[1][1]);
Output: ▗
for a in 0..2 {
for b in 0..2 {
for c in 0..2 {
for d in 0..2 {
print!("{}", BOX[a][b]
[c][d]);
}
}
}
}
println!("");
Output: ▗▖▄▝▐▞▟▝▚▌▙▀▜▛▋