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 ...
14 years, 2 months ago
(2010-02-23 07:12:29 UTC)
#6
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 ...
14 years, 2 months ago
(2010-02-28 02:26:31 UTC)
#8
Issue 217064: code review 217064: Count utf8 runes, not bytes when determining string wid...
(Closed)
Created 14 years, 2 months ago by mnehpets
Modified 14 years, 2 months ago
Reviewers:
Base URL:
Comments: 1