[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: .substring bug - indicies don't work as documented(?)
From: |
Ralph Corderoy |
Subject: |
Re: .substring bug - indicies don't work as documented(?) |
Date: |
27 Oct 2001 19:43:05 +0100 |
Hi Werner,
> > Replace the string in register xx with the sub-
> > string defined by the indices n1 and n2. The first
> > character in the string has index one. If n2 is
> > omitted, it is taken to be equal to the string's
> > length. If the index value n1 or n2 is negative or
> > zero, it will be counted from the end of the
> > string, going backwards: The last character has
> > index 0, the character before the last character
> > has index -1, etc.
>
> It is a bug. Thanks for spotting. I've just fixed it in the CVS.
> Now you'll get the following consistent results:
So my earlier diagram should be
1 2 3 4 5 6 7
a b c d e f g
-6 -5 -4 -3 -2 -1 0
to match the fixed code.
Ralph.
Re: .substring bug - indicies don't work as documented(?), Werner LEMBERG, 2001/10/27
- Re: .substring bug - indicies don't work as documented(?),
Ralph Corderoy <=