Availability:built-in
line_position(+Stream,
-Count)Unify Count with the position on the current line. Note that
this assumes the position is 0 after the open. Count is a
display column: tabs advance to the next 8-th character,
backspaces reduce the count by one provided it is positive, a
double-width character counts for two and non-printable characters as
well as ANSI escape sequences (see ansi_format/3)
count for none. Use
character_count/2
to count characters rather than columns.
- Enhanced in 10.1.13 (👉4097ffa) line_position/2 skips ANSI escape sequences