1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-20 05:21:26 +02:00

Merge pull request #2785 from reddyalready/Kotlin-templ-str-print-output

[kotlin/en] Added print output for template string command
This commit is contained in:
Andre Polykanine A.K.A. Menelion Elensúlë
2017-08-23 16:53:19 +03:00
committed by GitHub

View File

@@ -65,7 +65,7 @@ fun helloWorld(val name : String) {
A template expression starts with a dollar sign ($). A template expression starts with a dollar sign ($).
*/ */
val fooTemplateString = "$fooString has ${fooString.length} characters" val fooTemplateString = "$fooString has ${fooString.length} characters"
println(fooTemplateString) println(fooTemplateString) // => My String Is Here! has 18 characters
/* /*
For a variable to hold null it must be explicitly specified as nullable. For a variable to hold null it must be explicitly specified as nullable.