2016-08-11 12:45 GMT+02:00 webwarrior :
> Why not use standard collection API?
>
> 'Uquillas G\''{o}mez' reject: [ :c | #($\ ${ $}
>
There is short version: copyWithoutAll:#($\ ${ $}
2016-08-11 7:30 GMT+02:00 stepharo :
> Now I was really wondering how I could copy characters by characters
> without relying on a stream to get a string from the correct size at the
> end.
>
> In particular copyWithout: and friends only works either with one
> subcollection or one elements and I
Why not use standard collection API?
'Uquillas G\''{o}mez' reject: [ :c | #($\ ${ $} $' $`) includes: c ]
thenCollect: #asLowercase
--
View this message in context:
http://forum.world.st/manipulating-strings-tp4910349p4910451.html
Sent from the Pharo Smalltalk Users mailing list archive at Nab
Now I was really wondering how I could copy characters by characters
without relying on a stream to get a string from the correct size at the
end.
In particular copyWithout: and friends only works either with one
subcollection or one elements and I have mulitple elements \ { } '`
Stef
Le
quite nice indeed!
Le 10/8/16 à 20:04, Esteban A. Maringolo a écrit :
'Uquillas G\''{o}mez' onlyLetters asLowercase
Would this work?
'Uquillas G\''{o}mez' onlyLetters asLowercase
Esteban A. Maringolo
2016-08-10 15:00 GMT-03:00 stepharo :
> I did
>
>
> String
> streamContents: [ :str |
> aString
> do: [ :aChar |
> aChar isLetter
>
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
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 charac