Literals/String: Difference between revisions

Content deleted Content added
PureFox (talk | contribs)
Added Kotlin
Line 998:
 
fun main(args: Array<String>) {
val cl = 'a' // character literal - can contain escaped character
val esl = "abc\ndef" // escaped string literal - can contain escaped character(s)
val rsl = """
This is a raw string literal
Line 1,010:
tripled quotes.
"""
val msl = """
|Leading whitepacewhitespace can be removed from a raw
|string literal by including
|a margin prefix ('|' is the default)
|in combination with the trimMargin function.
""". trimMargin()
println(cl)
println(esl)