takeLines

fun CharSequence.takeLines(count: Int, addOmittedLinesSuffix: Boolean): String

Return

the first count lines of this string, plus an optional ... (N more lines) suffix

Parameters

count

number of lines to take

addOmittedLinesSuffix

whether to add a suffix indicating how many lines were omitted