lua-users home
lua-l archive

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


On Mon, 18 Apr 2011 19:11:26 +0200
Gilles Ganault <gilles.ganault@free.fr> wrote:

> On Mon, 18 Apr 2011 12:07:56 -0500, Rob Hoelz <rob@hoelz.ro> wrote:
> >Also, you're using the for loop wrong.  For iterating over each line
> >in a string, you'd probably use string.gmatch; for a table, try
> >ipairs or pairs.
> 
> Thanks but why is it better to use string.gmatch() instead of
> io.lines()? In this case, there's only one item per line.
> 
> 

It's actually not; I was just mentioning string.gmatch for your future
reference.

Attachment: signature.asc
Description: PGP signature