title: How can I replace consecutive whitespace with a single space from the whole string
body: <p>I have a string with 2,3 or more spaces between non-space characters</p>
  
  <pre><code>string = "a  b c   d"
  </code></pre>
  
  <p>What can I do to make it like that:</p>
  
  <pre><code>output_string == "a b c d"
  </code></pre>