title: Does String::from_utf8_lossy() allocate memory?
body: <p>I want to convert the first 10 bytes of an array to a string.</p>
  
  <p>If I do <code>String::from_utf8_lossy()</code>, this will return <code>&amp;str</code>.</p>
  
  <p>Do I understand correctly that <code>&amp;str</code> is the address of those 10 bytes and in fact the memory will be allocated only to create the link?</p>