Last active
April 26, 2020 11:05
-
-
Save gyugyu90/f62c7a4b81a9a2aebea5273948db411a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
var a = 1 | |
// 템플릿 내에 변수를 넣거나 | |
val s1 = "a is $a" | |
a = 2 | |
// 변수를 활용한 표현식을 넣을 수도 있습니다. | |
val s2 = "${s1.replace("is", "was")}, but now is $a" | |
println(s2) // a was 1, but now is 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment