I have found myself having to turn a chunk of Lua code into a string so it can be run as a proper Lua chunk. Writing code like that is not too difficult, but it's time consuming and prone to minor errors that result in lost development time and patience.
Is there any tool/filter capable of taking a piece of runnable code and turning it into a proper string?
If I am not explaining myself right (not native English speaker, my apologies!), I want to find a tool that turns code like
MyFunction("String!")
into
"MyFunction(\"String!\")"
It's trivial in the example, but when talking several lines of code, it's pretty tedious.
I am using Linux as my main OS, perhaps there is some filtering tool available? A Lua-based solution would be interesting just for amusement, too.