]> Cypherpunks repositories - gostls13.git/commit
strconv: add 0b, 0o integer prefixes in ParseInt, ParseUint
authorRuss Cox <rsc@golang.org>
Wed, 30 Jan 2019 02:21:38 +0000 (21:21 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 12 Feb 2019 14:48:26 +0000 (14:48 +0000)
commit11af3535310ed1f92cb75f523082702988bbd7f6
treebf2c1b802639dd1174662d3761b768be3e6ef7f9
parent36a81d5ec37904e44a9a2959c140687d558cd25f
strconv: add 0b, 0o integer prefixes in ParseInt, ParseUint

This CL modifies ParseInt and ParseUint to recognize
0b and 0o as binary and octal base prefixes when base == 0.

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

For #19308.
For #12711.

Change-Id: I8efe067f415aa517bdefbff7e230d3fa1694d530
Reviewed-on: https://go-review.googlesource.com/c/160244
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/strconv/atoi.go
src/strconv/atoi_test.go