mirror of
https://github.com/golang/go
synced 2024-11-23 14:50:07 -07:00
strconv: make docs for Itoa and Atoi slightly higher level
Fixes #29461 Change-Id: I5db8bc80e5bd0778dced8471581c67e66853aada Reviewed-on: https://go-review.googlesource.com/c/155924 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
480373c756
commit
ed78c90a78
@ -198,7 +198,7 @@ func ParseInt(s string, base int, bitSize int) (i int64, err error) {
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// Atoi returns the result of ParseInt(s, 10, 0) converted to type int.
|
||||
// Atoi is equivalent to ParseInt(s, 10, 0), converted to type int.
|
||||
func Atoi(s string) (int, error) {
|
||||
const fnAtoi = "Atoi"
|
||||
|
||||
|
@ -30,7 +30,7 @@ func FormatInt(i int64, base int) string {
|
||||
return s
|
||||
}
|
||||
|
||||
// Itoa is shorthand for FormatInt(int64(i), 10).
|
||||
// Itoa is equivalent to FormatInt(int64(i), 10).
|
||||
func Itoa(i int) string {
|
||||
return FormatInt(int64(i), 10)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user