Some characters take up two cells and a terminal though, double wide. And some characters will take up one cell. If you want to do any kind of formating, say to draw a line or panel around it, you need to know exactly how many cells a piece of text will take up. You might have a function which em takes a character and returns either one or two. That's what m rich does. But am some characters you can't know, because they will render differently on different terminals. Are rendered differently on e term, and in windows m a and linnox. It gets even more complicated when you get multiple characters, so multiple wat the multiple code points in character

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode