offsetToPosition

Converts a character offset in the text to a CursorPosition.

Return

the CursorPosition corresponding to the given offset

Parameters

text

the text content to search in

offset

the character offset to convert