How can I check if a string contains more than one whitespace or period?
I´m using myString.replacingOccurrences(of: ",", with: ".") 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?
 
     
    