Skip to content

Commit e764432

Browse files
odeke-emgriesemer
authored andcommitted
doc/go1.13: document _ between digits for math/big, strconv
Document that: * math/big.Float.Parse * math/big.Int.SetString * strconv.ParseFloat * strconv.ParseInt * strconv.ParseUint now accept underscores to group digits only if base = 0, as per the Go 2 language changes. Updates #32815 Change-Id: Id45bd803a18442436419739297e8aed0d32ca56c Reviewed-on: https://go-review.googlesource.com/c/go/+/191077 Reviewed-by: Robert Griesemer <[email protected]>
1 parent eee07a8 commit e764432

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/go1.13.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
723723
The new <a href="/pkg/math/big/#Rat.SetUint64"><code>Rat.SetUint64</code></a> method sets the <code>Rat</code> to a <code>uint64</code> value.
724724
</p>
725725

726+
<p><!-- CL 166157 -->
727+
For <a href="/pkg/math/big/#Float.Parse"><code>Float.Parse</code></a>, if base is 0, underscores
728+
may be used between digits for readability.
729+
See the <a href="#language">Changes to the language</a> for details.
730+
</p>
731+
732+
<p><!-- CL 166157 -->
733+
For <a href="/pkg/math/big/#Int.SetString"><code>Int.SetString</code></a>, if base is 0, underscores
734+
may be used between digits for readability.
735+
See the <a href="#language">Changes to the language</a> for details.
736+
</p>
737+
726738
<p><!-- CL 168237 -->
727739
<a href="/pkg/math/big/#Rat.SetString"><code>Rat.SetString</code></a> now accepts non-decimal floating point representations.
728740
</p>
@@ -888,6 +900,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
888900

889901
</dl><!-- runtime -->
890902

903+
<dl id="strconv"><dt><a href="/pkg/strconv">strconv</a></dt>
904+
<dd>
905+
<p><!-- CL 160243 -->
906+
For <a href="/pkg/math/big/#strconv.ParseFloat"><code>strconv.ParseFloat</code></a>,
907+
<a href="/pkg/math/big/#strconv.ParseInt"><code>strconv.ParseInt</code></a>
908+
and <a href="/pkg/math/big/#strconv.ParseUint"><code>strconv.ParseUint</code></a>,
909+
if base is 0, underscores may be used between digits for readability.
910+
See the <a href="#language">Changes to the language</a> for details.
911+
</p>
912+
913+
</dl><!-- strconv -->
914+
891915
<dl id="strings"><dt><a href="/pkg/strings">strings</a></dt>
892916
<dd>
893917
<p><!-- CL 142003 -->

0 commit comments

Comments
 (0)