mirror of
https://github.com/docker/cli.git
synced 2026-11-12 15:53:52 -04:00
- Treat the remaining invisible format controls as zero width - Treat bidi isolates and other invisible format characters as zero width - Measure ambiguous Latin letters as one cell in East Asian locales - Fix width mismatches found by the Hegel property tests - Recognise CJK locales regardless of charset spelling full diff: https://github.com/mattn/go-runewidth/compare/v0.0.30...v0.0.31 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
go-runewidth
Provides functions to get fixed width of the character or string.
Usage
runewidth.StringWidth("つのだ☆HIRO") == 12
NOTE: Latin letters that Unicode gives ambiguous East Asian width, such as
ü, é and ß, are measured as one cell even when EastAsianWidth is
set, as terminals draw them in CJK locales too. Other ambiguous characters
such as ±, × and ○ still take two cells there.
Author
Yasuhiro Matsumoto
License
under the MIT License: http://mattn.mit-license.org/2013