Am 07.04.2015 um 21:31 schrieb Peter Uhn��k <i.uhnak@gmail.com>:


'BormParticipant' allButFirst: 4
('BormParticipant' splitOn: 'Borm') last
Thank you both, this will work. :)

In the Moose configuration, there is a CollectionExtensions that allows you to do this:
'BormParticipant' removePrefix: 'Borm' "-> 'Participant'".
'BormParticipant' removeSuffix: 'Participant' "-> 'Borm'"

For Pharo 5, we should move these extensions to Pharo.

Isn't it the case that a remove* methods mostly return what has been removed? Wouldn't be

withoutPrefix:
withoutSuffix:
I guess withoutPrefix: would probably makes more sense.

As well as

allButPrefix:
allButSuffix:

but to me the sound of them is weird.

Norbert