4.19 Primitive character I/O
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Primitive character I/O
          • nl/0
          • nl/1
          • put/1
          • put/2
          • put_byte/1
          • put_byte/2
          • put_char/1
          • put_char/2
          • put_code/1
          • put_code/2
          • tab/1
          • tab/2
          • flush_output/0
          • flush_output/1
          • ttyflush/0
          • get_byte/1
          • get_byte/2
          • get_code/1
          • get_code/2
          • get_char/1
          • get_char/2
          • get0/1
          • get0/2
          • get/1
          • get/2
          • peek_byte/1
          • peek_byte/2
          • peek_code/1
          • peek_code/2
          • peek_char/1
          • peek_char/2
          • peek_string/3
          • skip/1
          • skip/2
          • get_single_char/1
          • with_tty_raw/1
          • at_end_of_stream/0
          • at_end_of_stream/1
          • set_end_of_stream/1
          • copy_stream_data/3
          • copy_stream_data/2
          • fill_buffer/1
          • read_pending_codes/3
          • read_pending_chars/3
    • Packages
Availability:built-in
peek_string(+Stream, +Len, -String)
Read the next Len characters (if the stream is a text stream) or bytes (if the stream is binary) from Stream without removing the data. If Len is larger that the stream buffer size, the buffer size is increased to Len. String can be shorter than Len if the stream contains less data. This predicate is intended to guess the content type of data read from non-repositionable streams.