title: How to check for multiple whitespaces in a string
body: <p>How can I check if a string contains more than one whitespace or period?    </p>
  
  <p>I´m using <code>myString.replacingOccurrences(of: ",", with: ".")</code> to change  comma to period, is there a similar function to remove whitespaces, or any other character of choice if they occur more than once?</p>