get_iter_at_line_index


Description:

public bool get_iter_at_line_index (out TextIter iter, int line_number, int byte_index)

Obtains an iterator pointing to byte_index within the given line.

byte_index must be the start of a UTF-8 character. Note bytes, not characters; UTF-8 may encode one character as multiple bytes.

If line_number is greater than or equal to the number of lines in the this, the end iterator is returned. And if byte_index is off the end of the line, the iterator at the end of the line is returned.

Parameters:

this

a `GtkTextBuffer`

iter

iterator to initialize

line_number

line number counting from 0

byte_index

byte index from start of line

Returns:

whether the exact position has been found




2022 vala-language.org