]> Cypherpunks repositories - gostls13.git/commit
fmt: separate unicode and integer formatting
authorMartin Möhrmann <martisch@uos.de>
Fri, 11 Mar 2016 12:29:23 +0000 (13:29 +0100)
committerRob Pike <r@golang.org>
Thu, 17 Mar 2016 09:30:26 +0000 (09:30 +0000)
commitd38275c74a3f694e35efdc5e3586487ed5e7659c
tree435e717a372372329e93d08b81680e730ae153c8
parent56e0ecc5ea67c4cd71fe894bf9745f35273bcdea
fmt: separate unicode and integer formatting

Separate unicode formatting into its own fmt_unicode function.
Remove the fmtUnicode wrapper and the f.unicode and f.uniQuote
flags that are not needed anymore. Remove mangling and restoring
of the precision and sharp flags.

Removes the buffer copy needed for %#U by moving
the character encoding before the number encoding.

Changes the behavior of plus and space flag to have
no effect instead of printing a plus or space before "U+".

Always print at least four digits after "U+"
even if precision is set to less than 4.

Change-Id: If9a0ee79e9eca2c76f06a4e0fdd75d98393899ac
Reviewed-on: https://go-review.googlesource.com/20574
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/fmt/fmt_test.go
src/fmt/format.go
src/fmt/print.go