摘要:
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... 阅读全文
摘要:
import ( "fmt" "strings" ) func main() { //检查字符串传是否包含指定字符,返回true或者false fmt.Println(strings.Contains("hello go", "hello")) //组合切片成一个字符串 fmt.Println(strings.Join([]string{"a", "1"}, ",")) //... 阅读全文