Method

GtkTextBufferget_slice

Declaration [src]

char*
gtk_text_buffer_get_slice (
  GtkTextBuffer* buffer,
  const GtkTextIter* start,
  const GtkTextIter* end,
  gboolean include_hidden_chars
)

Description [src]

Returns the text in the range [start,end).

Excludes undisplayed text (text marked with tags that set the invisibility attribute) if include_hidden_chars is FALSE. The returned string includes a 0xFFFC character whenever the buffer contains embedded images, so byte and character indexes into the returned string do correspond to byte and character indexes into the buffer. Contrast with gtk_text_buffer_get_text(). Note that 0xFFFC can occur in normal text as well, so it is not a reliable indicator that a paintable or widget is in the buffer.

Parameters

start GtkTextIter
 

Start of a range.

 The data is owned by the caller of the function.
end GtkTextIter
 

End of a range.

 The data is owned by the caller of the function.
include_hidden_chars gboolean
 

Whether to include invisible text.

Return value

Returns: utf8
 

An allocated UTF-8 string.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.