+ 1 :)

can you open a bug entry and I prefer withoutPrefix:, withoutSuffix:

Stef

Le 6/4/15 21:28, Tudor Girba a ��crit��:
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.

Cheers,
Doru


On Mon, Apr 6, 2015 at 12:51 PM, Norbert Hartl <norbert@hartl.name> wrote:
If you have the amount auf characters you want to omit you can do

'BormParticipant' allButFirst: 4

Norbert

> Am 06.04.2015 um 12:34 schrieb Peter Uhn��k <i.uhnak@gmail.com>:
>
> Hi,
>
> am I really blind, or is there no way to do something like
> 'BormParticipant' removePrefix: 'Borm' "-> 'Participant'"
> or
> 'BormParticipant' copyFrom: 5 "-> 'Participant'" "OrderedCollection knows this"
>
> I can do copyFrom:to:, but that requires asking the size of the string, which is (in my eyes) ugly.
>
> So is there better (=single message) way?
>
> Thanks,
> Peter





--
www.tudorgirba.com

"Every thing has its own flow"