摘要: 1. string转int // 法1:string转int num_str := "1234567" /* ParseInt():查看文档https://studygolang.com/pkgdoc 参数1:返回字符串表示的整数值,接受正负号。 参数2:base指定进制(2到36),如果base为 阅读全文
posted @ 2021-06-24 21:36 o云淡风轻o 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1. int转string // 法1: int转string num_int := 10 num_str_2 := fmt.Sprintf("%b", num_int) fmt.Printf("num_int的数据类型是%T, num_str_2的数据类型是%T, num_str_2=%s\n", 阅读全文
posted @ 2021-06-24 17:04 o云淡风轻o 阅读(1106) 评论(0) 推荐(0) 编辑