I've got a number in a string like so: @"+316-55 840 659"
. I want this to transform to: @"+31655840659"
.
Right now, I'm using this:
[[number componentsSeparatedByCharactersInSet:
[[NSCharacterSet decimalDigitCharacterSet] invertedSet]]
componentsJoinedByString:@""];
Is there a way to modify [NSCharacterSet decimalDigitCharacterSet]
so that it allows the +
as well?