RubyTalk@gmail.com
5/8/2009 11:45:00 PM
Element Reference=97If passed a single Fixnum, returns the code of the
character at that position. If passed two Fixnum objects, returns a
substring starting at the offset given by the first, and a length
given by the second. If given a range, a substring containing
characters at offsets given by the range is returned. In all three
cases, if an offset is negative, it is counted from the end of str.
Returns nil if the initial offset falls outside the string, the length
is negative, or the beginning of the range is greater than the end.
two fixed numbers returns a substring.
On Fri, May 8, 2009 at 4:39 PM, Sebastian Hungerecker
<sepp2k@googlemail.com> wrote:
> Am Samstag 09 Mai 2009 01:32:06 schrieb Eleanor McHugh:
>> "foo"[3..3] =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =3D> nil
>
> You sure? I get "", same as the op. If it would return nil, I don't think=
the
> op would have asked his question.
>
>