NSCharacterSet
And now for the anti-patterns. Take a gander at the answers to this question on StackOverflow. […] I don’t mean to rag on any of the answerers personally–this is all to point out how many ways there are to approach these kinds of tasks, and how many of those ways are totally wrong.
The recommended solution creates so many temporary objects, though.