13.13.1 字符串连接

可以使用 + 运算符或 += 赋值语句连接字符串。字符串加法通过连接两个操作数创建一个新字符串。

s := "hello " + "world"  // s 的值是“hello world”
s += " and you"          // a 的值现在是 “hello world and you”

最后更新于