appendLine

Appends a line feed character (\n) to this Appendable.

@IgnorableReturnValueinline fun Appendable.appendLine(): Appendable(source)
fun main() {
    val sb = StringBuilder()
    sb.append("First line")
      .appendLine()
    sb.append("Second line")
      .appendLine()
    println(sb.toString())
}

Source