offsetToPosition

fun offsetToPosition(text: String, offset: Int): Position

Converts a character offset in the text to a Position.

Return

the Position corresponding to the given offset

Parameters

text

the text content to search in

offset

the character offset to convert