I did
String
streamContents: [ :str |
aString
do: [ :aChar |
aChar isLetter
ifTrue: [ str nextPut: aChar asLowercase ] ] ]
I'm curious about other solution because I was lucky that isLetter exist.
Stef
Le 10/8/16 à 19:48, stepharo a écrit :
> Hi
>
> I have the following problem I want to transform a string into another
> while removing a set of characters
>
> 'Uquillas G\'{o}mez'
>
> ->
>
> 'uquillasgomez'
>
> And I wonder how to do that?
>
> copyWithoutAll:
>
>
> I was thinking to create a string of the same size and copy only the
> valid characters.
>
> Now I do not know how to set the size of the resulting string.
>
> I could use stream.
>
> Any ideas is welcome.
>
> Stef
>
>
>