aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-20 03:35:29 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-20 03:35:29 -0500
commit8841984e10d4101545ebb9d9cff35f558791de06 (patch)
tree16efbe5f292d1467a3e320e63938174b96e0f46e /src
parent07f8c1715a4e900272de901303ef6a4e28ce4dfa (diff)
downloadvt100-test-8841984e10d4101545ebb9d9cff35f558791de06.tar.gz
vt100-test-8841984e10d4101545ebb9d9cff35f558791de06.zip
also display text width
Diffstat (limited to 'src')
-rw-r--r--src/bin/explode.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/explode.rs b/src/bin/explode.rs
index 37ed07c..d23a59b 100644
--- a/src/bin/explode.rs
+++ b/src/bin/explode.rs
@@ -1,4 +1,5 @@
use std::io::Read as _;
+use unicode_width::UnicodeWidthStr as _;
#[derive(Default)]
struct Printer {
@@ -12,7 +13,7 @@ impl Printer {
fn flush(&mut self) {
if !self.chars.is_empty() {
- println!("TEXT \"{}\"", self.chars);
+ println!("TEXT({}) \"{}\"", self.chars.width(), self.chars);
self.chars.clear();
}
}