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

withoutPrefix:
withoutSuffix:

a good alternative?

my 2 cents,

Norbert

> Cheers,
> Doru
> 
> 
> On Mon, Apr 6, 2015 at 12:51 PM, Norbert Hartl <norb...@hartl.name 
> <mailto:norb...@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.uh...@gmail.com 
> > <mailto:i.uh...@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 <http://www.tudorgirba.com/>
> 
> "Every thing has its own flow"

Reply via email to