s := ''''''. s size -> 2 works fine for me. am i missing something? - on On May 3, 2010, at 22:54 , Schwab,Wilhelm K wrote:
Stef,
First, try #printString - it might do the job for you. Failing that, you can do something like
| out | out := WriteStream on:String new. self do:[ :c | c = $' ifTrue:[ out nextPut:$' ]. out nextPut:c. ]. ^out contents.
I'll be interested to see all of the better ways to do this.
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse Sent: Monday, May 03, 2010 3:48 PM To: Pharo Development Subject: [Pharo-project] how to simply double a ' inside string
Does anybody know how to double a ' inside a string?
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project