### ----------------------------------------------------
### -- Gnome::Gtk3
### -- Licenses: Artistic-2.0
### -- Authors: Marcel Timmerman
### -- File: docs/content-docs/reference/Gtk3/TextIter.md
### ----------------------------------------------------
### -- Chunk 2 of 2
 middle of a UTF-8 encoded character.

    method gtk_text_iter_set_line_index ( Int $byte_on_line )

  * Int $byte_on_line; a byte index relative to the start of *iter*’s current line

[[gtk_] text_iter_] forward_to_end
----------------------------------

Moves *iter* forward to the “end iterator,” which points one past the last valid character in the buffer. `gtk_text_iter_get_char()` called on the end iterator returns 0, which is convenient for writing loops.

    method gtk_text_iter_forward_to_end ( )

[[gtk_] text_iter_] forward_to_line_end
---------------------------------------

Moves the iterator to point to the paragraph delimiter characters, which will be either a newline, a carriage return, a carriage return/newline in sequence, or the Unicode paragraph separator character. If the iterator is already at the paragraph delimiter characters, moves to the paragraph delimiter characters for the next line. If *iter* is on the last line in the buffer, which does not end in paragraph delimiters, moves to the end iterator (end of the last line), and returns `0`.

Returns: `1` if we moved and the new location is not the end iterator

    method gtk_text_iter_forward_to_line_end ( --> Int  )

[[gtk_] text_iter_] set_visible_line_offset
-------------------------------------------

Like `gtk_text_iter_set_line_offset()`, but the offset is in visible characters, i.e. text with a tag making it invisible is not counted in the offset.

    method gtk_text_iter_set_visible_line_offset ( Int $char_on_line )

  * Int $char_on_line; a character offset

[[gtk_] text_iter_] set_visible_line_index
------------------------------------------

Like `gtk_text_iter_set_line_index()`, but the index is in visible bytes, i.e. text with a tag making it invisible is not counted in the index.

    method gtk_text_iter_set_visible_line_index ( Int $byte_on_line )

  * Int $byte_on_line; a byte index

[[gtk_] text_iter_] forward_to_tag_toggle
-----------------------------------------

Moves forward to the next toggle (on or off) of the **Gnome::Gtk3::TextTag** *tag*, or to the next toggle of any tag if *tag* is `Any`. If no matching tag toggles are found, returns `0`, otherwise `1`. Does not return toggles located at *iter*, only toggles after *iter*. Sets *iter* to the location of the toggle, or to the end of the buffer if no toggle is found.

Returns: whether we found a tag toggle after *iter*

    method gtk_text_iter_forward_to_tag_toggle ( N-GObject $tag --> Int  )

  * N-GObject $tag; (allow-none): a **Gnome::Gtk3::TextTag**, or `Any`

[[gtk_] text_iter_] backward_to_tag_toggle
------------------------------------------

Moves backward to the next toggle (on or off) of the **Gnome::Gtk3::TextTag** *tag*, or to the next toggle of any tag if *tag* is `Any`. If no matching tag toggles are found, returns `0`, otherwise `1`. Does not return toggles located at *iter*, only toggles before *iter*. Sets *iter* to the location of the toggle, or the start of the buffer if no toggle is found.

Returns: whether we found a tag toggle before *iter*

    method gtk_text_iter_backward_to_tag_toggle ( N-GObject $tag --> Int  )

  * N-GObject $tag; (allow-none): a **Gnome::Gtk3::TextTag**, or `Any`

[[gtk_] text_iter_] forward_search
----------------------------------

Searches forward for *str*. Any match is returned by setting *match_start* to the first character of the match and *match_end* to the first character after the match. The search will not continue past *limit*. Note that a search is a linear or O(n) operation, so you may wish to use *limit* to avoid locking up your UI on large buffers.

*match_start* will never be set to a **Gnome::Gtk3::TextIter** located before *iter*, even if there is a possible *match_end* after or at *iter*.

Returns: whether a match was found

    method gtk_text_iter_forward_search ( Str $str, GtkTextSearchFlags $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit --> Int  )

  * Str $str; a search string

  * GtkTextSearchFlags $flags; flags affecting how the search is done

  * N-GObject $match_start; (out caller-allocates) (allow-none): return location for start of match, or `Any`

  * N-GObject $match_end; (out caller-allocates) (allow-none): return location for end of match, or `Any`

  * N-GObject $limit; (allow-none): location of last possible *match_end*, or `Any` for the end of the buffer

[[gtk_] text_iter_] backward_search
-----------------------------------

Same as `gtk_text_iter_forward_search()`, but moves backward.

*match_end* will never be set to a **Gnome::Gtk3::TextIter** located after *iter*, even if there is a possible *match_start* before or at *iter*.

Returns: whether a match was found

    method gtk_text_iter_backward_search ( Str $str, GtkTextSearchFlags $flags, N-GObject $match_start, N-GObject $match_end, N-GObject $limit --> Int  )

  * Str $str; search string

  * GtkTextSearchFlags $flags; bitmask of flags affecting the search

  * N-GObject $match_start; (out caller-allocates) (allow-none): return location for start of match, or `Any`

  * N-GObject $match_end; (out caller-allocates) (allow-none): return location for end of match, or `Any`

  * N-GObject $limit; (allow-none): location of last possible *match_start*, or `Any` for start of buffer

[gtk_] text_iter_equal
----------------------

Tests whether two iterators are equal, using the fastest possible mechanism. This function is very fast; you can expect it to perform better than e.g. getting the character offset for each iterator and comparing the offsets yourself. Also, it’s a bit faster than `gtk_text_iter_compare()`.

Returns: `1` if the iterators point to the same place in the buffer

    method gtk_text_iter_equal ( N-GTextIter $rhs --> Int  )

  * N-GTextIter $rhs; another **Gnome::Gtk3::TextIter**

[gtk_] text_iter_compare
------------------------

A `qsort()`-style function that returns negative if *lhs* is less than *rhs*, positive if *lhs* is greater than *rhs*, and 0 if they’re equal. Ordering is in character offset order, i.e. the first character in the buffer is less than the second character in the buffer.

Returns: -1 if *lhs* is less than *rhs*, 1 if *lhs* is greater, 0 if they are equal

    method gtk_text_iter_compare ( N-GTextIter $rhs --> Int  )

  * N-GTextIter $rhs; another **Gnome::Gtk3::TextIter**

[[gtk_] text_iter_] in_range
----------------------------

Checks whether *iter* falls in the range [*start*, *end*). *start* and *end* must be in ascending order.

Returns: `1` if *iter* is in the range

    method gtk_text_iter_in_range ( N-GTextIter $start, N-GTextIter $end --> Int  )

  * N-GTextIter $start; start of range

  * N-GTextIter $end; end of range

[gtk_] text_iter_order
----------------------

Swaps the value of *first* and *second* if *second* comes before *first* in the buffer. That is, ensures that *first* and *second* are in sequence. Most text buffer functions that take a range call this automatically on your behalf, so there’s no real reason to call it yourself in those cases. There are some exceptions, such as `gtk_text_iter_in_range()`, that expect a pre-sorted range.

    method gtk_text_iter_order ( N-GTextIter $second )

  * N-GTextIter $second; another **Gnome::Gtk3::TextIter**



