[lang-ref] 文字列中の変数補完 ( kotlin )
@Test
fun stringInterpolationVariable() {
// "$x"
val name = "John"
val s = "My name is $name."
assertEquals("My name is John.", s)
}
@Test
fun stringInterpolationVariableAlternative() {
// "${x}"
val name = "John"
val s = "My name is ${name}."
assertEquals("My name is John.", s)
}