Golang
ha1bert_
这个作者很懒,什么都没留下…
展开
-
算法总结(Go语言)
主要是Go语言各种算法、数据结构的使用。原创 2022-03-12 17:11:41 · 1244 阅读 · 0 评论 -
Go 过滤字符串中非字母、数字的字符
import "fmt"func main() { s := "asdlllajsd123{}#^$^#" r := "" for i := 0; i < len(s); i++ { if IsAlnum(s[i]) { r = r + string(s[i]) } } fmt.Println(r)}// IsAlnum 判断func IsAlnum(b byte) bool { return (b >= 'a' && b <= 'z')原创 2022-02-26 12:22:23 · 1620 阅读 · 0 评论 -
Go语言语法总结
如何你使用的是Chrome,可以试试Ctrl+F搜索你想要找的内容!会持续更新的。package main //声明代码在哪个包里面,就是位置在哪import "fmt" //引用依赖库,fmt是标准库func main(){} //功能函数os.Exit(-1) //main函数不支持返回值,使用这个代码返回fmt.Println() //输出打印os.Args //获得命令行参数编写测试程序的源码文件以 _test 结尾:xxx_test.go测试方法名以 Tes.原创 2022-02-11 14:10:37 · 398 阅读 · 0 评论