title: How to remove whitespace in String using pure Swift?
body: <p>Now, I'm practicing the Swift Language.</p>
  
  <p>I created a <code>StringHelper</code> Class.</p>
  
  <p>It saves a string in the <code>str</code> property, and by using a method, it returns same string without whitespace.</p>
  
  <pre><code>class StringHelper {
  
      let str:String
  
      init(str:String) {
          self.str = str
      }
  
      func removeSpace() -&gt; String {
          //how to code
      }
  }
  
  
  let myStr = StringHelper(str: "hello swift")
  
  myStr.removeSpace()//it should print  'helloswift'
  </code></pre>
  
  <p><strong>I want to use only the Swift language... not the <code>NSString</code> methods</strong>, because I'm just practicing using Swift.</p>