[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: File I/O, find line?
- From: Joe Seeley <joiey.seeley@...>
- Date: Tue, 11 Jan 2005 16:46:10 -0600
I'm pretty new to Lua, and am using the I/O API for the first time. I
am currently trying to read/write ini files for an application that I
support. The file has parameters similar to this.
What I would like to do is find if certain parameters are defined for
different subsets. I am able to find my line range by locating the
subset title and then the next blank line following it. I then want
to find my matching parameter that falls inside that range. The way I
would like to do this is with a function like so
-- code here....
if line_found then
The problem that I am running into is that the only file offset I have
encountered is a character offset via file:seek("set", charOffset).
Is there an easy way to offset directly to the lines I desire?
Thanks so much in advance!