lua-users home
lua-l archive

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


On May 4, 2013, at 11:22 PM, Rena <hyperhacker@gmail.com> wrote:

> Maybe the maximum length could be specified
> in the format string, e.g. '*l:255'?

What about just spell it out to start with:

• number: reads a string with up to this number of bytes, returning nil on end of file. If number is zero, it reads nothing and returns an empty string, or nil on end of file.

http://www.lua.org/manual/5.2/manual.html#pdf-file:read