Format in kotlin string templates

前端 未结 6 1331
青春惊慌失措
青春惊慌失措 2020-12-12 17:40

Kotlin has an excellent feature called string templates. I really love it.

 val i = 10 
 val s = \"i = $i\" // evaluates to \"i = 10\"

But

6条回答
提交回复
热议问题