Crates.io | txtframe |
lib.rs | txtframe |
version | 0.4.0 |
source | src |
created_at | 2023-04-25 18:55:45.066845 |
updated_at | 2023-05-28 09:33:15.404193 |
description | Creates a frame for text. |
homepage | https://github.com/pic16f877ccs/txtframe |
repository | https://github.com/pic16f877ccs/txtframe |
max_upload_size | |
id | 848741 |
size | 134,975 |
Displays text within predefined or custom frames. You can set the frame color, change the text alignment.
use txtframe::*;
let mut text_frame = TextFrame::new()
.frame_var(&FrameVar::Space)
.algn(Algn::Centr)
.color_fra(Color::Red)
.color_txt(Color::Cyan)
.color_fill(Color::Magenta)
.expand(0)
.width(100)
.expand_width(0)
.expand_height(0)
.left_top('✤')
.right_top('✤')
.left_btm('✤')
.right_btm('✤')
.top_line('―')
.vert_left('│')
.vert_right('│')
.btm_line('―')
.fill('░');
let text_frame_iter = text_frame.frame_iter("Text frame");
println!("{}", text_frame_iter.collect::<String>());
GNU General Public License v3.0