Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
28
Task/Here-document/Kotlin/here-document.kotlin
Normal file
28
Task/Here-document/Kotlin/here-document.kotlin
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// version 1.1.0
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val ev = "embed variables"
|
||||
|
||||
val here = """
|
||||
This is a raw string literal
|
||||
which does not treat escaped characters
|
||||
(\t, \b, \n, \r, \', \", \\, \$ and \u)
|
||||
specially and can contain new lines,
|
||||
indentation and other whitespace
|
||||
within the string.
|
||||
|
||||
"Quotes" or doubled ""quotes"" can
|
||||
be included without problem but not
|
||||
tripled quotes.
|
||||
|
||||
It's also possible to $ev
|
||||
in a raw string literal using string
|
||||
interpolation.
|
||||
|
||||
If you need to include a
|
||||
literal ${'$'} sign in a raw string literal then
|
||||
don't worry you've just done it!
|
||||
"""
|
||||
|
||||
println(here)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue