4.18 Status of streams
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Status of streams
          • wait_for_input/3
          • byte_count/2
          • character_count/2
          • line_count/2
          • line_position/2
    • Packages
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.