Re: [Pharo-users] manipulating strings

2016-08-11 Thread Denis Kudriashov
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:#($\ ${ $}

Re: [Pharo-users] manipulating strings

2016-08-11 Thread Nicolai Hess
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

Re: [Pharo-users] manipulating strings

2016-08-11 Thread webwarrior
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

Re: [Pharo-users] manipulating strings

2016-08-10 Thread 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 have mulitple elements \ { } '` Stef Le

Re: [Pharo-users] manipulating strings

2016-08-10 Thread stepharo
quite nice indeed! Le 10/8/16 à 20:04, Esteban A. Maringolo a écrit : 'Uquillas G\''{o}mez' onlyLetters asLowercase

Re: [Pharo-users] manipulating strings

2016-08-10 Thread Esteban A. Maringolo
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 >

Re: [Pharo-users] manipulating strings

2016-08-10 Thread stepharo
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

[Pharo-users] manipulating strings

2016-08-10 Thread stepharo
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