Gtk.Editable.prototype.delete_text

function delete_text(start_pos:Number, end_pos:Number):void {
    // Gjs wrapper for gtk_editable_delete_text()
}

Deletes a sequence of characters. The characters that are deleted are those characters at positions from start_pos up to, but not including end_pos. If end_pos is negative, then the characters deleted are those from start_pos to the end of the text.

Note that the positions are specified in characters, not bytes.

start_pos

start position

end_pos

end position