peek/2

"peek(+ S, - C" ) is deprecated

If C is unbound, or is the code for a character, and the stream S is a te`xt stream, read the next character from the current stream and unigfy its code with C, while leaving the current stream position unaltered.

Please use the ISO built-in peek_code_50 "peek_code/2".