Method

Gtk.TextBuffer.get_iter_at_line_offset

Declaration [src]

gboolean
gtk_text_buffer_get_iter_at_line_offset (
  GtkTextBuffer* buffer,
  GtkTextIter* iter,
  int line_number,
  int char_offset
)

Description [src]

Obtains an iterator pointing to char_offset within the given line.

Note characters, not bytes; UTF-8 may encode one character as multiple bytes.

If line_number is greater than the number of lines in the buffer, the end iterator is returned. And if char_offset is off the end of the line, the iterator at the end of the line is returned.

Parameters

iter GtkTextIter
 

iterator to initialize

 Direction: out
 Ownership is not transferred to the callee
line_number int
 

line number counting from 0

char_offset int
 

char offset from start of line

Return value

Returns: gboolean

whether the exact position has been found