摘要:
Go 文件操作-读写文件 Go读取文件 整个文件读取进内存(适合读小文件) 1. 直接指定文件名读取 os.ReadFile() ioutil.ReadFile() (在 Go 1.16 开始,ioutil.ReadFile() 就等价于 os.ReadFile()) package main im 阅读全文
posted @ 2024-03-19 21:21
等你下课啊
阅读(237)
评论(0)
推荐(0)
摘要:
GO 反转字符串 package main import "fmt" func main() { str := "hello,world" bytes := []byte(str) lenBytes := len(bytes) forLen := lenBytes / 2 for i := 0; i 阅读全文
posted @ 2024-03-19 18:12
等你下课啊
阅读(26)
评论(0)
推荐(0)