string To int
字符串为纯数字,值为:123456
aInt, _ := strconv.Atoi("123456") fmt.Printf("数据类型: %T, 值: %d", aInt, aInt)
字符串不为纯数字,值为:0
aInt, _ := strconv.Atoi("123456d") fmt.Printf("数据类型: %T, 值: %d", aInt, aInt)
int To string
纯数字, 值为: 1234
aInt := strconv.Itoa(1234) fmt.Printf("数据类型: %T, 值: %v", aInt, aInt)
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。