How to remove numbers from a String in Swift [closed]
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I have a String like "75003 Paris, France" or "Syracuse, NY 13205, USA" . I want to use same code to remove all those numbers out of those Strings. How can I achieve that? 回答1: You can do it with the NSCharacterSet var str = "75003 Paris, France" var stringWithoutDigit = (str