--- Begin Message ---You need to add something like this in class String:rejectForAcronymsWords: aCollectionOfUnwantedWords " 'An example with an unwanted particle at the start of a sentence and also one in the middle' rejectForAcronymsWords: #('a' 'an' 'the' 'in' 'of' 'at' 'and') " ^self asLowercase substrings reject: [ :word | aCollectionOfUnwantedWords includes: word] ----------------- Benoît St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero". (A. Einstein) On Saturday, November 24, 2018, 3:49:56 p.m. EST, Roelof Wobben <r.wob...@home.nl> wrote: Hello, For a acronym maker challenge on exercism.io I have to make acronyms. But I see I have to split the parts on space and when it's a word with a - then I have to split on that, Any hint how I can do that ? Roelof
--- End Message ---
Re: [Pharo-users] split on space or -
Benoit St-Jean via Pharo-users Sat, 24 Nov 2018 13:06:34 -0800
- [Pharo-users] split on space or - Roelof Wobben
- Re: [Pharo-users] split on space or - Benoit St-Jean via Pharo-users
- Re: [Pharo-users] split on space or - Nicolai Hess
- Re: [Pharo-users] split on space o... Benoit St-Jean via Pharo-users
- Re: [Pharo-users] split on space o... Roelof Wobben
- Re: [Pharo-users] split on spa... Roelof Wobben
- Re: [Pharo-users] split on... Nicolai Hess