Appending a character to a string

Philippe Marschall philippe.marschall at gmail.com
Sun Feb 11 17:22:50 UTC 2007


2007/2/11, Jon Hylands <jon at huv.com>:
> On Sun, 11 Feb 2007 18:00:21 +0100, Damien Cassou
> <damien.cassou at laposte.net> wrote:
>
> > However, #, only works with collections. I'm obliged to use #copyWith:
> > instead. Is there a pattern to do this without using Streams ?
>
> self doSomethingWith: myString, (String with: Character cr), anotherString.

I find that quite ugly. For many things like this there are:
String space
String cr
String crlf
String tab


Philippe

> Later,
> Jon
>
> --------------------------------------------------------------
>    Jon Hylands      Jon at huv.com      http://www.huv.com/jon
>
>   Project: Micro Raptor (Small Biped Velociraptor Robot)
>            http://www.huv.com/blog
>
>



More information about the Squeak-dev mailing list