Kotlin

KotlinでString.formatを使う

More than 1 year has passed since last update.

Javaでいうこれは

String.format("this is %s format string", "a")
// => this is a format string

Kotlinではこう書く。

"this is %s format string".format("a")
// => this is a format string