6 个版本 (3 个破坏性更新)
0.4.0 | 2023年5月28日 |
---|---|
0.3.0 | 2023年5月19日 |
0.2.0 | 2023年5月17日 |
0.1.2 | 2023年4月30日 |
#1709 in 文本处理
每月下载量 61 次
用于 seven_seg
32KB
632 行
txtframe
在框中显示文本。
在预定义或自定义的框内显示文本。您可以设置框颜色,改变文本对齐。
示例
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 通用公共许可证 v3.0
lib.rs
:
在框中显示文本。
在预定义或自定义的框内显示文本。您可以设置框颜色,改变文本对齐。
示例
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>());
依赖项
~255–340KB