title: trying to trim and lowercase my String in rust
body: <p>I'm trying to trim and lowercase my String.</p>
  <p>Currently I have</p>
  <pre class="lang-rust prettyprint-override"><code>use dialoguer::Input;
      
  let input: String = Input::new()
      .with_prompt(&quot;Guess a 5 letter word&quot;)
      .interact_text()
      .unwrap(); 
  let guess: &amp;str = input.as_str(); // trim and lowercase
  </code></pre>
  <p>I'm trying to transform <code>String</code> into a trimmed and lowercased <code>&amp;str</code> but some functions are only on <code>&amp;str</code> and others only on <code>String</code> so I'm having trouble coming up with an elegant solution.</p>
  <p>TL;DR: End goal have <code>guess</code> be a trimmed and lowercase <code>&amp;str</code></p>