Rob Sanderson writes:
> On Tue, 2006-08-08 at 12:18 +0100, Mike Taylor wrote:
> > Robert Sanderson writes:
> > > >The proposed substring function is really many functions in
> > > >disguise. I reckon it is at least five distinct functions:
> > >
> > > At least. But we don't really want 5 or more relation modifiers that
> > > each cover a small part of the functionality of substrings, do we?
> >
> > I sort of agree with Ashley that this is overloaded; but I also agree
> > with Rob that breaking it into five is not the solution. I think that
> > going to a 1-based index is a mistake, and that the consequent benefit
> > of getting to use 0 to mean "the end" is too small to be worth the
> > cost. I think the proposal as it stands is just about right.
>
> Which proposal are you talking about in particular?
>
> The current version has not only 0 as both start and end, but -0 as the
> start, and negative numbers being magical in the end position but not
> the start!
>
Ouch!
> I'm looking for a set of rules for start and end positions that have as
> few special cases as possible, while being easy to understand and apply.
>
> Also suggested to me was start,length
> eg:
> marc.008 =/substring="0,6" 920102
>
> With negative numbers counting backwards. This has no special cases, is
> zero based and easy to apply.
This is what I thought was on the table. I like it.
_/|_ ___________________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ It's hard not to suspect that SOAP was thought up late one Friday
night after a few too many beers.
|