Try this:
'vowels' reject: [:e | 'aeiouy' includes: e]
----------------- Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein)
----- Original Message ---- From: Mathieu Suen mathk.sue@gmail.com To: The general-purpose Squeak developers list squeak-dev@lists.squeakfoundation.org Sent: Thursday, March 1, 2007 9:51:48 AM Subject: Shorten string
Hi,
Is they a way to shorten string in a way that i still understandable but more compacte? For exemple something that remove all the vowel.
Thanks
Math
'vowels' copyWithoutAll: 'aeiou' copy.
'vowels' select: [:aCharacter | aCharacter isVowel not].
aStream := 'vowels' copy readStream. result := WriteStream on: String new. [aStream atEnd] whileFalse: [ nextCharacter := aStream next. nextCharacter isVowel ifFalse: [ result nextPut: nextCharacter. ] ]. aStream ^result contents
Ron Teitelbaum
From: Benoit St-Jean Sent: Thursday, March 01, 2007 9:58 AM
Try this:
'vowels' reject: [:e | 'aeiouy' includes: e]
Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein)
----- Original Message ---- From: Mathieu Suen mathk.sue@gmail.com To: The general-purpose Squeak developers list <squeak- dev@lists.squeakfoundation.org> Sent: Thursday, March 1, 2007 9:51:48 AM Subject: Shorten string
Hi,
Is they a way to shorten string in a way that i still understandable but more compacte? For exemple something that remove all the vowel.
Thanks
Math
From: "Ron Teitelbaum" Ron@USMedRec.com Reply-To: Ron@USMedRec.com, The general-purpose Squeak developers listsqueak-dev@lists.squeakfoundation.org To: "'The general-purpose Squeak developers list'"squeak-dev@lists.squeakfoundation.org Subject: RE: Shorten string Date: Thu, 1 Mar 2007 10:41:02 -0500
'vowels' copyWithoutAll: 'aeiou' copy.
What is that copy message for? I think you are a bit paranoid, no?
_________________________________________________________________ Mortgage rates as low as 4.625% - Refinance $150,000 loan for $579 a month. Intro*Terms https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=...
-----Original Message----- From: J J Sent: Thursday, March 01, 2007 3:56 PM
From: "Ron Teitelbaum" Ron@USMedRec.com
'vowels' copyWithoutAll: 'aeiou' copy.
What is that copy message for? I think you are a bit paranoid, no?
Paranoid? Yes!!
(Actually it's a very subtle joke from a previous thread about compiled literals)
Ron Teitelbaum
squeak-dev@lists.squeakfoundation.org