extract digits from string in Obj-C [duplicate]
问题 This question already has answers here : iphone sdk - Remove all characters except for numbers 0-9 from a string [duplicate] (3 answers) Closed 6 years ago . I'm new to Objective-C, but experienced in other higher languages. I want to normalize a string by removing all non-numeric characters. In other words given the input string "206-555-1212" the normalized result should be "2065551212". The code snippet below works, but given my experience in other languages that seems like overkill. Is