If I'm not mistaken, for new line in JVM it is pro...
# getting-started
e
If I'm not mistaken, for new line in JVM it is proper to use
System.lineSeparator()
But in the Kotlin standard library it's just
'\n'
So, I'm confused by this. Is that by design?
So, I end up with own
Copy code
fun StringBuilder.appendLine(value: String) {
    append(value).append(System.lineSeparator())
}
in my project
k
There used to be a StringBuilder.appendln extension function which appended
System.lineSeparator
but it was deprecated in Kotlin 1.4. See https://youtrack.jetbrains.com/issue/KTLC-27/Deprecate-appendln-in-favor-of-appendLine.
👍 2
e
Thanks