Gtk.TextIter.prototype.get_offset

function get_offset():Number {
    // Gjs wrapper for gtk_text_iter_get_offset()
}

Returns the character offset of an iterator. Each character in a Gtk.TextBuffer has an offset, starting with 0 for the first character in the buffer. Use gtk_text_buffer_get_iter_at_offset () to convert an offset back into an iterator.

Returns

a character offset