https://kotlinlang.org logo
#announcements
Title
# announcements
e

elect

04/02/2021, 11:29 PM
is
${'\n'}
the only way to add a new line in triple quotes?
b

Big Chungus

04/02/2021, 11:37 PM
You can just press enter in triple quotes
"""line one This is now on new line Third line thanks to triple quotes"""
e

elect

04/02/2021, 11:38 PM
I need multiple new lines, I forgot to specify that
b

Big Chungus

04/02/2021, 11:40 PM
Either insert them raw as """one Five""" Or use ${List(count).joinToString("\n")}
p

Paul Griffith

04/03/2021, 12:26 AM
keep in mind that the latter will be many orders of magnitude slower than just inserting literals
👆 2
19 Views