getLineUntilPosition

fun Position.getLineUntilPosition(text: String): String?

Return

the substring from the start of the line, up to the specified position, or null if the position is out of bounds

Parameters

text

the text content to search in