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)
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)