[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Idiom for counting lines in a string
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 13 May 2014 13:02:35 -0300
> Is there anything neater than this?
>
> select(2,str:gsub('\n',''))+1
#str:gsub("[^\n]","")