侧边栏壁纸
  • 累计撰写 100 篇文章
  • 累计创建 55 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

Golang 类型转换

Malson
2022-06-25 / 0 评论 / 0 点赞 / 74 阅读 / 71 字
// int64 to string
strconv.FormatInt(int64,10)
// uint to string
strconv.FormatUint(uint64(n), 10)
// uint64 to string
strconv.FormatUint(uint64, 10)
// float32 to string
strconv.FormatFloat(float32, 'f', -1, 32)
// float64 to string
strconv.FormatFloat(float64, 'f', -1, 64)
// string to int
strconv.Atoi("1498003200")
// string to int64
strconv.ParseInt("1498003200", 10, 64)
// string to uint64
strconv.ParseUint(_form.ProjectId, 10, 64)
0
博主关闭了所有页面的评论