]> Cypherpunks repositories - gostls13.git/commit
Count utf8 runes, not bytes when determining string width. Note
authorStephen Ma <stephenm@golang.org>
Sun, 28 Feb 2010 10:15:56 +0000 (21:15 +1100)
committerRob Pike <r@golang.org>
Sun, 28 Feb 2010 10:15:56 +0000 (21:15 +1100)
commita627d61d5dc5b3eab0f57800e7cc13154a656f7d
treedee6c3ea1ecc9f08f792af8f2799cc079cd4d01d
parentfe746055a2a29806b97b0702197b52420a7e09b2
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 #612.

R=r
CC=golang-dev
https://golang.org/cl/217064
src/pkg/fmt/fmt_test.go
src/pkg/fmt/format.go
src/pkg/fmt/print.go