Count utf8 runes, not bytes when determining string width. Note
that pad() still counts bytes, but it's currently only used for
1 byte runes.
Fixes issue 612.
On 23/02/2010, at 5:33 PM, Russ Cox wrote:
> # already has meaning, and this applies to every
> format, not just %s.
Let's just go with your (Stephen's) original suggestion, plus documentation.
-rob
http://codereview.appspot.com/217064/diff/3001/3004 File src/pkg/fmt/print.go (right): http://codereview.appspot.com/217064/diff/3001/3004#newcode47 src/pkg/fmt/print.go:47: of UTF-8 runes in the string. This differs from ...
Issue 217064: code review 217064: Count utf8 runes, not bytes when determining string wid...
(Closed)
Created 15 years ago by mnehpets
Modified 15 years ago
Reviewers:
Base URL:
Comments: 1