title: How to remove all the whitespaces from a string in Kotlin?
body: <p>I've already tried <code>trim()</code> but it only removes whitespaces before and after the text. I want something like this.</p>
  
  <p>var str= "This is an example text"</p>
  
  <p>output:</p>
  
  <blockquote>
    <p>Thisisanexampletext</p>
  </blockquote>