title: lua equivalent of python repr
body: <p>Is there an equivalent function to Python's repr() function in Lua? In other words a function that prints non-printable characters with \x where x is n or b etc, or \000 code if not a Lua string escape character. I've googled and can't find anything. Lots to find about putting non-printables in a string, nothing about generating a print-friendly version of a string with non-printable chars. </p>