]> Cypherpunks repositories - gostls13.git/commit
strconv: accept underscores in ParseInt, ParseUint, ParseFloat
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 01:59:33 +0000 (20:59 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 12 Feb 2019 14:48:24 +0000 (14:48 +0000)
commit36a81d5ec37904e44a9a2959c140687d558cd25f
tree19bb3691b874dd416b2bb85dcf7676d6832ff773
parente2d87f2ca5affab517baef8008cb80559d03e15a
strconv: accept underscores in ParseInt, ParseUint, ParseFloat

This CL modifies ParseInt, ParseUint, and ParseFloat
to accept digit-separating underscores in their arguments.
For ParseInt and ParseUint, the underscores are only
allowed when base == 0.

See golang.org/design/19308-number-literals for background.

For #28493.

Change-Id: I057ca2539d89314643f591ba8144c3ea7126651c
Reviewed-on: https://go-review.googlesource.com/c/160243
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/strconv/atof.go
src/strconv/atof_test.go
src/strconv/atoi.go
src/strconv/atoi_test.go