1
0
mirror of https://github.com/golang/go synced 2024-11-15 10:50:37 -07:00

[release-branch.go1] strconv: better documentation for FormatInt, FormatUint.

««« backport e2e4e44b1804
strconv: better documentation for FormatInt, FormatUint.

Fixes #3580.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6252047

»»»
This commit is contained in:
Robert Griesemer 2012-06-13 16:24:20 -04:00
parent c8e2ccdc9c
commit 73052c1d6c

View File

@ -4,13 +4,17 @@
package strconv
// FormatUint returns the string representation of i in the given base.
// FormatUint returns the string representation of i in the given base,
// for 2 <= base <= 36. The result uses the lower-case letters 'a' to 'z'
// for digit values >= 10.
func FormatUint(i uint64, base int) string {
_, s := formatBits(nil, i, base, false, false)
return s
}
// FormatInt returns the string representation of i in the given base.
// FormatInt returns the string representation of i in the given base,
// for 2 <= base <= 36. The result uses the lower-case letters 'a' to 'z'
// for digit values >= 10.
func FormatInt(i int64, base int) string {
_, s := formatBits(nil, uint64(i), base, i < 0, false)
return s