title: How to (un)escape strings in C/C++?
body: <p>Given a <strong>counted</strong> string (either an array of characters, or a wrapper like <code>std::string</code>), is there a "proper" way to escape and/or unescape it in C or C++, such that "special" characters (like the null character) become C-style-escaped and "normal" characters stay the way they are?</p>
  
  <p>Or do I have to do it by hand?</p>