Expand description
Lua string-literal escaping.
Reproduces Lua 5.1 string.format("%q", s) plus serpent’s two post-passes.
The result is a double-quoted Lua string literal that load reads back to
the exact input bytes, including NUL and other control characters. This must
be byte-exact for round trips, and it runs over binary data such as dumped
bytecode.
Functions§
- quote
- Quote a byte string as a Lua string literal.