Appending a character to a string
Giovanni Corriga
giovanni at corriga.net
Sun Feb 11 18:40:20 UTC 2007
Il giorno dom, 11/02/2007 alle 18.00 +0100, Damien Cassou ha scritto:
> Hi,
>
> Often, I want to concatenate a character to a string :
>
> self doSomethingWith: myString, Character cr, anotherString.
>
>
> However, #, only works with collections. I'm obliged to use #copyWith:
> instead. Is there a pattern to do this without using Streams ?
>
> Would it be desirable to enhance #, to allow concatenation of a single
> element ?
Personally, yes. It also shouldn't be too hard to implement a
double-dispatch mechanism for that.
Giovanni
More information about the Squeak-dev
mailing list
|