Method

GtkTextIterget_slice

Declaration [src]

gchar*
gtk_text_iter_get_slice (
  const GtkTextIter* start,
  const GtkTextIter* end
)

Description [src]

Returns the text in the given range. A “slice” is an array of characters encoded in UTF-8 format, including the Unicode “unknown” character 0xFFFC for iterable non-character elements in the buffer, such as images. Because images are encoded in the slice, byte and character offsets in the returned array will correspond to byte offsets in the text buffer. Note that 0xFFFC can occur in normal text as well, so it is not a reliable indicator that a pixbuf or widget is in the buffer.

Parameters

end

Type: GtkTextIter

Iterator at end of a range.

The data is owned by the caller of the method.

Return value

Type: gchar*

Slice of text from the buffer.

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