Keyboard

↓ ↑
move between the rows you can see
→
open a feature, then step into it
←
close a feature, or step out to the one above
Enter
go to the page in focus
Tab
the same rows, plus everything else on the page
/
search the whole report
m
open or close the navigation drawer
Esc
leave the search box, or close the drawer
?
this list

Measures a string one visible character at a time

All 12 scenarios hold

The formatter measures alignment in terminal display columns, not in characters. These rules say how wide a value renders in a monospaced font. The Column width feature and the Cell padding and alignment feature build on them.

A string is as wide as the characters a reader sees in it. A visible character can be several code points: a letter and its accent, a flag, emoji joined into one picture, an emoji with a skin tone, a symbol followed by the emoji selector, a Hangul syllable written as its letters. Each such character takes the columns of the widest kind it holds, once, so a joined emoji takes two columns, as a terminal draws it.

A null string and an empty string both draw nothing. The formatter measures both as zero, and rejects neither.

expected outcome broken scenario
ScenarioTextWidth?
Every glyph one columnHello5
Every glyph two columns你好世界8
One-column and two-column mixedHello 👋 World14
A letter and a combining accenté1
A symbol with the emoji selector☀️2
A flag🇳🇴2
Emoji joined into one picture👨‍👩‍👧2
An emoji with a skin tone👍🏽2
A keycap1️⃣2
A Hangul syllable written as letters한2
A null string0
An empty string“”0