Method

GtkTextIterforward_search

Declaration [src]

gboolean
gtk_text_iter_forward_search (
  const GtkTextIter* iter,
  const gchar* str,
  GtkTextSearchFlags flags,
  GtkTextIter* match_start,
  GtkTextIter* match_end,
  const GtkTextIter* limit
)

Description [src]

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 GtkTextIter located before iter, even if there is a possible match_end after or at iter.

Parameters

str

Type: const gchar*

A search string.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
flags

Type: GtkTextSearchFlags

Flags affecting how the search is done.

match_start

Type: GtkTextIter

Return location for start of match, or NULL.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.
match_end

Type: GtkTextIter

Return location for end of match, or NULL.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.
limit

Type: GtkTextIter

Location of last possible match_end, or NULL for the end of the buffer.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: gboolean

Whether a match was found.