lua-users home
lua-l archive

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


RJP Computing wrote:
> Is there a way to loop through a string "lines" at a time? Kind of like
> file:lines(). I am very new to the string library in Lua and I can't get
> what I want out of the string.

Perhaps something like:

	for s in string.gmatch(foo, ".*$")
		-- do stuff with line
	end

?

B.