Isn't it the case that a remove* methods mostly return what has been removed? Wouldn't beAm 06.04.2015 um 21:28 schrieb Tudor Girba <tudor@tudorgirba.com>: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,DoruOn 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
--