lua-users home
lua-l archive

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


Simple unix-ish string with EOL as '\n' (0x0a), what is the most
efficient way of counting the number of lines?  I can think of a bunch
of methods (looping on byte(), looping on find(plain) for instance),
but it's far from clear which one would be the most efficient.  Any
idea which one would be?

  OG.