Package: gtk

Function gtk-text-iter-line-offset

Lambda List

gtk-text-iter-line-offset (iter)

Syntax

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

Arguments

iter -- a gtk-text-iter instance
char-on-line -- an integer with a character offset relative to the start of the current line of the iterator

Details

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

The function gtk-text-iter-line-offset returns the character offset of the iterator, counting from the start of a newline-terminated line. The function (setf gtk-text-iter-line-offset) moves the iterator within a line, to a new character offset.

The first character on the line has offset 0. The given character offset must be less than or equal to the number of characters in the line. If equal, the iterator moves to the start of the next line. See the function gtk-text-iter-line-index if you have a byte index rather than a character offset.
 

See also

*2021-7-24