mirror of
https://github.com/golang/go
synced 2024-11-05 16:56:16 -07:00
unicode/utf8: use strings.Builder
Change-Id: I88b55f61eccb5764cac2a9397fd99a62f8735a9a Reviewed-on: https://go-review.googlesource.com/c/go/+/428281 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com>
This commit is contained in:
parent
77da976419
commit
6a2ff105f1
@ -626,7 +626,7 @@ var longStringJapanese string // ~100KB, non-ASCII
|
||||
|
||||
func init() {
|
||||
const japanese = "日本語日本語日本語日"
|
||||
var b bytes.Buffer
|
||||
var b strings.Builder
|
||||
for i := 0; b.Len() < 100_000; i++ {
|
||||
if i%100 == 0 {
|
||||
b.WriteString(japanese)
|
||||
|
Loading…
Reference in New Issue
Block a user