Package: gtk

Function gtk-text-iter-line-index

Lambda List

gtk-text-iter-line-index (iter)

Syntax

(gtk-text-iter-line-index iter) => byte-on-line
(setf (gtk-text-iter-line-offset iter) byte-on-line)

Arguments

iter -- a gtk-text-iter instance
byte-on-line -- an integer with a byte index relative to the start of the current line of the iterator

Details

Accessor of the byte offset relative to the start of the current line of the iterator.

The function gtk-text-iter-line-index returns the byte index of the iterator, counting from the start of a newline-terminated line. The function (setf gtk-text-iter-line-index) sets the byte index.

Remember that the text buffer encodes text in UTF-8, and that characters can require a variable number of bytes to represent. The given byte index must be at the start of a character, it cannot be in the middle of a UTF-8 encoded character.
 

See also

2021-6-13