title: How to convert any type into String in Julia
body: <p>Using Julia, I'd like to reliably convert any type into type <code>String</code>. There seems to be two ways to do the conversion in v0.5, either the <code>string</code> function or <code>String</code> constructor. The problem is that you need to choose the right one depending upon the input type.</p>
  
  <p>For example, <code>typeof(string(1))</code> evaluates to <code>String</code>, but <code>String(1)</code> throws an error. On the other hand, <code>typeof(string(SubString{String}("a")))</code> evaluates to <code>Substring{String}</code>, which is not a subtype of <code>String</code>. We instead need to do <code>String(SubString{String}("a"))</code>.</p>
  
  <p>So it seems the only reliable way to convert any input <code>x</code> to type <code>String</code> is via the construct:</p>
  
  <pre><code>String(string(x))
  </code></pre>
  
  <p>which feels a bit cumbersome.</p>
  
  <p>Am I missing something here? </p>