数字转字符串
import "strconv"
- int -> string
strconv.Itoa(i int) string
- int64 -> string
strconv.FormatInt(i int64, base int) string
base = 10
字符串转数字
import "strconv"
- string -> int
strconv.Atoi(s string) (int, error)
- string -> int64
strconv.ParseInt(s string, base int, bitSize int) (i int64, err error)
base = 10
bitSize = 64
有疑问加站长微信联系(非本文作者)