[lang-ref] 文字列中の数式補完 ( kotlin )
@Test
fun stringInterpolationWithExpression() {
// "${x}"
val age = 20
val s = "I am ${age - 2} years old."
assertEquals("I am 18 years old.", s)
}
@Test
fun stringInterpolationWithExpression() {
// "${x}"
val age = 20
val s = "I am ${age - 2} years old."
assertEquals("I am 18 years old.", s)
}