Lawrence
06/06/2022, 7:43 PM\
to do so. Wondering if Kotlin has something similar
String a = "This is a long string";
String b = """
This is a \
long string""";
a.equals(b) // true
Joffrey
06/06/2022, 7:45 PM.replace("\n", "")
. This won't help with indents, though, which seems to also be removed in your Java example (if this behaves as you said it does). For indents, you have other utilities in Kolin called trimIndent
and trimMargin
Lawrence
06/06/2022, 7:46 PM"""
in the same final line it strips out the indents in java (i think)nkiesel
06/06/2022, 10:22 PMval b = """
This is a
""".trimIndent() + """
long string
""".trimIndent()