title: Tool to convert code into a string?
body: <p>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.</p>
  
  <p>Is there any tool/filter capable of taking a piece of runnable code and turning it into a proper string?</p>
  
  <p>If I am not explaining myself right (not native English speaker, my apologies!), I want to find a tool that turns code like</p>
  
  <pre><code>MyFunction("String!")
  </code></pre>
  
  <p>into</p>
  
  <pre><code>"MyFunction(\"String!\")"
  </code></pre>
  
  <p>It's trivial in the example, but when talking several lines of code, it's pretty tedious.</p>
  
  <p>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.</p>