Method

GtkTextIterforward_search

Declaration [src]

gboolean
gtk_text_iter_forward_search (
  const GtkTextIter* iter,
  const char* 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 const char*
 

A search string.

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

Flags affecting how the search is done.

match_start GtkTextIter
 

Return location for start of match.

 The argument will be set by the function.
 The argument can be NULL.
 The data is owned by the caller of the function.
match_end GtkTextIter
 

Return location for end of match.

 The argument will be set by the function.
 The argument can be NULL.
 The data is owned by the caller of the function.
limit 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 function.

Return value

Returns: gboolean
 

Whether a match was found.