1. 首页
  2. 数据库
  3. 其它
  4. Golang字符串函数

Golang字符串函数

上传者: 2021-01-16 18:21:08上传 PDF文件 29.07KB 热度 17次
Golang 文章目录Golang1 strconv2 strings 1 strconv 应该先导入包 import ( “fmt” “strconv” ) string -> int func main(){ n,err := strconv.Atoi(123) if err != nil { fmt.Println(err) }else{ fmt.Println(n) } } 结果 123 整数转字符串 str := strconv.Itoa(123) fmt.Println(str) 结果 “123” 字符串转[]byte var bytes = []by
下载地址
用户评论