[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string:sub
- From: spir <denis.spir@...>
- Date: Tue, 9 Mar 2010 10:34:12 +0100
On Mon, 8 Mar 2010 21:20:18 -0300
Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> > This is a strange point of view, for me. I mean it's fully correct,
> > sure, but when do we need to express an empty (sub)string (or any kind
> > of sequence) using literal indexes?
>
> They do not need to be literals. (1,0) is the result of string.find
> when it finds an empty string in the beginning of a string:
>
> print(string.find("a", "%d*")) --> 1 0
>
> string.find must be able to express that result, and so string.sub should
> accept that too.
Oh, yes. Thank you for this precision.
> -- Roberto
Denis
--
________________________________
la vita e estrany
spir.wikidot.com
- References:
- 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
- Re: string:sub, Roberto Ierusalimschy
- Re: string:sub, joao lobato
- Re: string:sub, Roberto Ierusalimschy
- Re: string:sub, spir
- Re: string:sub, Roberto Ierusalimschy