lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, 6 Mar 2010 19:40:04 +0000
joao lobato <btnfdp.lobato@gmail.com> wrote:

> And since
> 
> s:sub(0,#s) == s:sub(1,#s) and (''):sub(n,0) == '', for any string s
> and any integer n
> 
> and
> 
> > =("12345"):sub(1,2.5)  
> 12
> > =("12345"):sub(1,2.6)  
> 123
> 
> I suppose it would be better all around if string.sub only accepted
> non-null integers as indices

++

Denis
-- 
________________________________

la vita e estrany

spir.wikidot.com