On Tue, 2006-08-15 at 09:39 -0400, Ray Denenberg wrote:
> > -1:1 means the last character.
>
> Earlier you said:
> " -10:3 -- 3 characters starting at the 10th from last."
> leaving it an open question whether the "10" is zero- or one-based
> (confusion enough) so you're saying that it's one-based. Ok. then
> (inevitably) 0:1 is going to be supported and will mean the first
> character.
I don't agree. If it's a 1-based index then 0:1 is potentially the last
character, (but I'd rather see that as -1:1). 1:1 is the first
character.
If you're going to go for a 1-based system then 0 should have no place,
except possibly to specify that you want to search for an empty string,
and I doubt that this is ever going to be useful/used.
--
John Harrison
Special Collections and Archives
University of Liverpool Library
Chatham Street, PO Box 123, Liverpool, L693DA
e: [log in to unmask]
w: sca.lib.liv.ac.uk
t: 0151 7943142
f: 0151 7942681
|