ide-text-iter: Builder SDK Reference

## ide-text-iter ide-text-iter |

## Functions

gboolean | (*IdeTextIterCharPredicate) ()
gboolean | ide_text_iter_forward_find_char ()
gboolean | ide_text_iter_backward_find_char ()
gboolean | ide_text_iter_forward_word_start ()
gboolean | ide_text_iter_forward_WORD_start ()
gboolean | ide_text_iter_forward_word_end ()
gboolean | ide_text_iter_forward_WORD_end ()
gboolean | ide_text_iter_backward_paragraph_start ()
gboolean | ide_text_iter_forward_paragraph_end ()
gboolean | ide_text_iter_backward_sentence_start ()
gboolean | ide_text_iter_forward_sentence_end ()
gboolean | ide_text_iter_backward_WORD_start ()
gboolean | ide_text_iter_backward_word_start ()
gboolean | ide_text_iter_backward_WORD_end ()
gboolean | ide_text_iter_backward_word_end ()
gboolean | ide_text_iter_in_string ()
gboolean | ide_text_iter_find_chars_backward ()
gboolean | ide_text_iter_find_chars_forward ()
gchar * | ide_text_iter_current_symbol ()

## Description

## Functions

### IdeTextIterCharPredicate ()

    gboolean
    (*IdeTextIterCharPredicate) (GtkTextIter *iter,
                                 gunichar ch,
                                 gpointer user_data);

### ide_text_iter_forward_find_char ()

    gboolean
    ide_text_iter_forward_find_char (GtkTextIter *iter,
                                     IdeTextIterCharPredicate pred,
                                     gpointer user_data,
                                     const GtkTextIter *limit);

Similar to gtk_text_iter_forward_find_char but lets us acces to the iter in the predicate.

#### Parameters

pred | a callback to locate the char. | [scope call]

#### Returns

`TRUE` if found

Since: 3.32

### ide_text_iter_backward_find_char ()

    gboolean
    ide_text_iter_backward_find_char (GtkTextIter *iter,
                                      IdeTextIterCharPredicate pred,
                                      gpointer user_data,
                                      const GtkTextIter *limit);

#### Parameters

pred | . | [scope call]

Since: 3.32

### ide_text_iter_forward_word_start ()

    gboolean
    ide_text_iter_forward_word_start (GtkTextIter *iter,
                                      gboolean newline_stop);

### ide_text_iter_forward_WORD_start ()

    gboolean
    ide_text_iter_forward_WORD_start (GtkTextIter *iter,
                                      gboolean newline_stop);

### ide_text_iter_forward_word_end ()

    gboolean
    ide_text_iter_forward_word_end (GtkTextIter *iter,
                                    gboolean newline_stop);

### ide_text_iter_forward_WORD_end ()

    gboolean
    ide_text_iter_forward_WORD_end (GtkTextIter *iter,
                                    gboolean newline_stop);

### ide_text_iter_backward_paragraph_start ()

    gboolean
    ide_text_iter_backward_paragraph_start
                                   (GtkTextIter *iter);

Searches backwards until we find the beginning of a paragraph.

#### Parameters

iter | a GtkTextIter |

#### Returns

`TRUE` if we are not at the beginning of the buffer; otherwise `FALSE`.

Since: 3.32

### ide_text_iter_forward_paragraph_end ()

    gboolean
    ide_text_iter_forward_paragraph_end (GtkTextIter *iter);

Searches forward until the end of a paragraph has been hit.

#### Parameters

iter | a GtkTextIter |

#### Returns

`TRUE` if we are not at the end of the buffer; otherwise `FALSE`.

Since: 3.32

### ide_text_iter_backward_sentence_start ()

    gboolean
    ide_text_iter_backward_sentence_start (GtkTextIter *iter);

### ide_text_iter_forward_sentence_end ()

    gboolean
    ide_text_iter_forward_sentence_end (GtkTextIter *iter);

### ide_text_iter_backward_WORD_start ()

    gboolean
    ide_text_iter_backward_WORD_start (GtkTextIter *iter,
                                       gboolean newline_stop);

### ide_text_iter_backward_word_start ()

    gboolean
    ide_text_iter_backward_word_start (GtkTextIter *iter,
                                       gboolean newline_stop);

### ide_text_iter_backward_WORD_end ()

    gboolean
    ide_text_iter_backward_WORD_end (GtkTextIter *iter,
                                     gboolean newline_stop);

### ide_text_iter_backward_word_end ()

    gboolean
    ide_text_iter_backward_word_end (GtkTextIter *iter,
                                     gboolean newline_stop);

### ide_text_iter_in_string ()

    gboolean
    ide_text_iter_in_string (GtkTextIter *iter,
                             const gchar *str,
                             GtkTextIter *str_start,
                             GtkTextIter *str_end,
                             gboolean include_str_bounds);

Check if `iter` position in the buffer is part of `str` .

#### Parameters

iter | a GtkTextIter indicating the position to check for. |
str | A C type string. |
str_start | a GtkTextIter returning the str start iter (if found). | [out]
str_end | a GtkTextIter returning the str end iter (if found). | [out]
include_str_bounds | `TRUE` if we take into account the str limits as possible `iter` positions. |

#### Returns

`TRUE` if case of succes, `FALSE` otherwise.

Since: 3.32

### ide_text_iter_find_chars_backward ()

    gboolean
    ide_text_iter_find_chars_backward (GtkTextIter *iter,
                                       GtkTextIter *limit,
                                       GtkTextIter *end,
                                       const gchar *str,
                                       gboolean only_at_start);

Search backward for a `str` string, starting at `iter` position till `limit` if there's one. In case of succes, `iter` is updated to `str` start position.

Notice that for `str` to be found, `iter` need to be at least on the `str` last char

#### Parameters

iter | a GtkTextIter indicating the start position to check for. |
limit | a GtkTextIter indicating the limit of the search. | [nullable]
end | a GtkTextIter returning the str end iter (if found). | [out][nullable]
str | A C type string. |
only_at_start | `TRUE` if the searched `str` string should be constrained to start `iter` position. |

#### Returns

`TRUE` if case of succes, `FALSE` otherwise.

Since: 3.32

### ide_text_iter_find_chars_forward ()

    gboolean
    ide_text_iter_find_chars_forward (GtkTextIter *iter,
                                      GtkTextIter *limit,
                                      GtkTextIter *end,
                                      const gchar *str,
                                      gboolean only_at_start);

Search forward for a `str` string, starting at `iter` position till `limit` if there's one. In case of succes, `iter` is updated to the found `str` start position, otherwise, its position is undefined.

#### Parameters

iter | a GtkTextIter indicating the start position to check for. |
limit | a GtkTextIter indicating the limit of the search. | [nullable]
end | a GtkTextIter returning the str end iter (if found). | [out][nullable]
str | A C type string. |
only_at_start | `TRUE` if the searched `str` string should be constrained to start `iter` position. |

#### Returns

`TRUE` if case of succes, `FALSE` otherwise.

Since: 3.32

### ide_text_iter_current_symbol ()

    gchar *
    ide_text_iter_current_symbol (const GtkTextIter *iter,
                                  GtkTextIter *out_begin);