lua-users home
lua-l archive

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


> I'm writing a function to quote a string, that is, it takes a string 
> and returns a string that when printed is acceptable as a lua literal 
> (and the literal is equal to the passed string).

This is the job of %q in string.format. I think support for
non-printable characters needs to be added to %q.
--lhf