]> Cypherpunks repositories - gostls13.git/commit
fmt: scanning widths apply after leading spaces
authorRob Pike <r@golang.org>
Fri, 12 Jun 2015 23:17:08 +0000 (16:17 -0700)
committerRob Pike <r@golang.org>
Sat, 13 Jun 2015 04:33:26 +0000 (04:33 +0000)
commita1fe3b5046d9f7249c04ce942f4d2d1d771bff40
tree7b10c8a3f5d263899b8c2b9c0229cde7d341a2d6
parentff8f3f0fa126c71059f53f81be3b87237fb55546
fmt: scanning widths apply after leading spaces

When scanning with a width, as in %5s, C skips leading spaces
brefore counting the 5 characters. We should do the same.

Reword the documentation about widths to make this clear.

Fixes #9444

Change-Id: I443a6441adcf1c834057ef3977f9116a987a79cd
Reviewed-on: https://go-review.googlesource.com/10997
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/fmt/doc.go
src/fmt/scan.go
src/fmt/scan_test.go