[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Fwd: Peeking N characters in string ports

From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] Fwd: Peeking N characters in string ports
Date: 11 Jan 2019 14:16:04 +0100

Hi David,

On Jan 11 2019, David Ireland wrote:

Hi there,

I'm reading from a (string) port and have a need to peek 2 characters
inside without actually reading off the port (read-char).

I believe procedures such as unread-char seen in other Schemes would solve
my problem however, this isn't available in Chicken it seems.

I do not recall that I ever used unread-char ever. I roughly recall that it usually can only "un-read" a single character. But that might be wrong.

Would anyone have any suggestions?

If you really need such a thing, my only suggestion would be to look into

make-input-port combined with make-concatenated-port and some tricks could do the trick.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]