Jan. 14, 2014
6:09 p.m.
On 14 Jan 2014, at 18:00, Daniel Lyons <fusion@storytotell.org> wrote:
I'm sure that if I could replace ' with '' on the way out it would be sufficient. Forgive my ignorance, but what's the simplest way to do that?
Replace all a's by aa's: | in | in := 'shjgababbaz' readStream. String new: in size streamContents: [ :out | [ in atEnd ] whileFalse: [ in peek = $a ifTrue: [ out nextPut: $a ]. out nextPut: in next ] ]. Sven