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.