[lang-ref] String interpolation (variable) ( kotlin )
@Test
fun stringInterpolationWithVariable() {
// "$x"
val name = "John"
val s = "My name is $name."
assertEquals("My name is John.", s)
}
@Test
fun stringInterpolationWithVariableAlternative() {
// "${x}"
val name = "John"
val s = "My name is ${name}."
assertEquals("My name is John.", s)
}