Non-decimal radices/Convert: Difference between revisions

Content added Content deleted
(this is better)
(→‎{{header|Go}}: note the limits of the base argument)
Line 915: Line 915:


=={{header|Go}}==
=={{header|Go}}==
The standard <code>strconv</code> package functions <code>ParseInt</code>, <code>ParseUint</code>, <code>FormatInt</code>, <code>FormatUint</code>,
and the standard <code>math/big</code> package method <code>SetString</code>,
all accept a base argument <code>2 ≤ base ≤ 36</code>.

Note, there is no equivalent formatting function provided for a <code>big.Int</code>, only the standard bases are available via <code>fmt</code> integer formatting verbs
(binary <code>%b</code>, octal <code>%o</code>, decimal <code>%d</code>, and hexidecimal <code>%x</code> or <code>%X</code>).
<lang go>package main
<lang go>package main