[squeak-dev] One liner challenge
Edgar J. De Cleene
edgardec2005 at gmail.com
Fri Mar 12 08:43:33 UTC 2010
On 3/12/10 2:56 AM, "Josh Gargus" <josh at schwa.ca> wrote:
> #upTo: is inconvenient for this because the result doesn't include the matched
> character. If we had #upToWith: we could write:
> | in | in := 'This is a (string) with some (parenthetical fields)' readStream.
> String streamContents: [:out | [in atEnd] whileFalse: [out nextPutAll: (in
> upToWith: $( ); nextPutAll: (in upToWith: $) ) asUppercase]]
I like this one. Nice !
More information about the Squeak-dev