lua-users home
lua-l archive

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

> > local n=0
> > for i in s:gmatch("\n") do n=n+1 end
> > print(n)
> Thanks, I'll use that one then :-)

BTW, I didn't say it was the fastest way, but the idea here is that
most of the scanning is done on the C side. YMMV...