golang字符串拼接

zr_go · · 1341 次点击
更多评论
go 1.10 可以这样 ```json package main import ( "fmt" "strings" ) func main() { var b strings.Builder for i := 3; i >= 1; i-- { fmt.Fprintf(&b, "%d...", i) } b.WriteString("ignition") fmt.Println(b.String()) } ```
#2