ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Loïc Péron <loic.pe...@bigfoot.com>
Subject Re: Fwd: Re: [PATCH] Basename.java has wrong behaviour against suffix removal
Date Fri, 28 Jun 2002 08:27:47 GMT
Quoting Diane Holt <holtdl@yahoo.com>:

> Oops -- missed the bit about your not being subscribed to the list the
> first time I read your mail.  Here's my response. -- Diane

Thanks :)

> > > Then, as the complete suffix is supplied, this suffix should be
> > > removed instead of relying on a '.' suffix separator.
> > 
> > Well, the idea was (and the doc states) that you don't need to
> > specify the ".", since from my perspective, that's what defines
> > a suffix. But I suppose if people wanted to specify a "suffix"
> > that was, say, _suffix instead of .suffix, then yeah, it'd need
> > to get the last index of "suffix" instead of ".". It'd mean
> > people would have to include the "." in the 'suffix' attribute,
> > though, and that would break it for anyone already relying on it
> > being added for them. I suppose I could add a new attribute
> > (eg., 'delimiter') that defaults to ".".

Or you automagically wipe a '.' that sits just before the removed
suffix:

1) remove supplied suffix (as proposed)
2) if value now ends with a '.', wipe it

This could be extended to a range of delimiter chars to remove
which defaults to ".", enabling to remove any suffix, even when
there is no separator between name and suffix (I agree it is a
somewhat strange case, but who nows :)

PS: I'm still not subscribed, but will be automagically cc:ed
if reply is made to all :)

-- 
Loïc Péron

phone:(33) 683 880 177
mailto:loic.peron@bigfoot.com

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message