Gtk.TextBuffer.prototype.get_iter_at_line_offset

function get_iter_at_line_offset(line_number:Number, char_offset:Number):void {
    // Gjs wrapper for gtk_text_buffer_get_iter_at_line_offset()
}

Obtains an iterator pointing to char_offset within the given line. The char_offset must exist, offsets off the end of the line are not allowed. Note <emphasis>characters</emphasis>, not bytes; UTF-8 may encode one character as multiple bytes.

line_number

line number counting from 0

char_offset

char offset from start of line