最佳答案
一个非常基本的问题,在 Kotlin 连接字符串的正确方法是什么?
在 Java 中,你可以使用 concat()
方法,例如。
String a = "Hello ";
String b = a.concat("World"); // b = Hello World
但是考特林没有 concat()
函数。我应该使用 +
符号吗?