Kotlin add carriage return into multiline string
This did the trick.
System.lineSeparator()
Kotlin multiline strings are always compiled into string literals which use \n as the line separator. If you need to have the platform-dependent line separator, you can do replace("\n", System.getProperty("line.separator"))
.
As of Kotlin 1.2, there is no standard library method for this, so you should define your own extension function if you're using this frequently.