摘要: import ( "fmt" "strconv" ) func main() { //append追加 slice := make([]byte, 0, 1024) slice = strconv.AppendBool(slice, true) slice = strconv.AppendInt(slice, 123, 10) slice = strconv.AppendQuot... 阅读全文
posted @ 2018-11-26 23:52 不骄不傲 阅读(311) 评论(0) 推荐(0) 编辑
摘要: import ( "fmt" "strings" ) func main() { //检查字符串传是否包含指定字符,返回true或者false fmt.Println(strings.Contains("hello go", "hello")) //组合切片成一个字符串 fmt.Println(strings.Join([]string{"a", "1"}, ",")) //... 阅读全文
posted @ 2018-11-26 23:42 不骄不傲 阅读(493) 评论(0) 推荐(0) 编辑