You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extern crate unicode_width;
fn main () {
let s = "\x1b[1;32m>>\x1b[0m ";
println!("{}", unicode_width::UnicodeWidthStr::width(s)); // 12
let s = ">> ";
println!("{}", unicode_width::UnicodeWidthStr::width(s)); // should be 3
}
The text was updated successfully, but these errors were encountered:
extern crate term_grid;
use term_grid::Cell;
fn main () {
let s = "\x1b[1;32m>>\x1b[0m ";
let cell: Cell = s.into();
println!("{}", cell.width); // 12
}
The text was updated successfully, but these errors were encountered: