[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string:sub
- From: joao lobato <btnfdp.lobato@...>
- Date: Sat, 6 Mar 2010 20:46:57 +0000
On 3/6/10, Shmuel Zeigerman <shmuz@013net.net> wrote:
> joao lobato wrote:
>> I suppose it would be better all around if string.sub only accepted
>> non-null integers as indices
>
> If s:sub(5,4) is valid then s:sub(1,0) should be valid too.
>
> --
> Shmuel
>
You are right. string.sub's behaviour depends on string.find's; it
must therefore accept both cases you pointed.
But why accept non-integers?
- References:
- string:sub, David Burgess
- Re: string:sub, Philippe Lhoste
- Re: string:sub, David Burgess
- Re: string:sub, Erik Lindroos
- Re: string:sub, David Burgess
- Re: string:sub, Enrico Colombini
- Re: string:sub, spir
- Re: string:sub, Scott Vokes
- Re: string:sub, joao lobato
- Re: string:sub, Shmuel Zeigerman