07 — Parsing and formatting¶
Text turned into numbers, and names and numbers turned into aligned text. In both directions Ruby's shortest spelling is the lenient one.
| Lesson | The one thing |
|---|---|
to_i never fails; Integer() does |
"abc".to_i is 0, and Integer("010") is 8 |
ljust and %-8s pad by code points, not columns |
why a table with café and 緑茶 in it will not line up |