String.format
调用。
使用字符串模板可使代码更简单。
快速修复会将调用替换为字符串模板。
示例:
fun main() {
val id = "abc"
val date = "123"
val s = String.format("%s_%s_%s", id, date, id)
}
在应用快速修复后:
fun main() {
val id = "abc"
val date = "123"
val s = "${id}_${date}_$id"
}