title: Print escaped representation of a str
body: <p>How do I print the escaped representation of a string, for example if I have:</p>
  
  <pre><code>s = "String:\tA"
  </code></pre>
  
  <p>I wish to output:</p>
  
  <pre><code>String:\tA
  </code></pre>
  
  <p>on the screen instead of</p>
  
  <pre><code>String:    A
  </code></pre>
  
  <p>The equivalent function in java is:</p>
  
  <pre><code>String xy = org.apache.commons.lang.StringEscapeUtils.escapeJava(yourString);
  System.out.println(xy);
  </code></pre>
  
  <p>from <a href="http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/StringEscapeUtils.html#escapeJava%28java.lang.String%29" rel="noreferrer">Apache Commons Lang</a></p>