lua-users home
lua-l archive

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


Many file formats divide naturally into groups of lines, such that you
only know that the group is done when you look at the first line of the
next group.

Is there a way to read a few characters of the next line without
advancing the file position, and then to re-read them with the rest
of the line when you know how to deal with it?

Or alternatively, is there a way to unread a line when you realize
it's not meant for the current group?

Or must I just maintain my own buffer?