golang go 中字符串和各种int类型之间的相互转换方式
作者:互联网
go 字符串和int互转
1.string转成int:
int, err := strconv.Atoi(string)
2.string转成int64:
int64, err := strconv.ParseInt(string, 10, 64)
3.int转成string:
string := strconv.Itoa(int)
4.int64转成string:
string := strconv.FormatInt(int64,10)
标签:string,int,strconv,golang,int64,转成,go 来源: https://www.cnblogs.com/zhaoyingjie/p/15702174.html