Is there a clean way to get a string containing only allowed characters?
for example:
NSString* myStr = @"a5&/Öñ33";
NSString* allowedChars = @"abcdefghijklmnopqrstuvwxyz0123456789";
NSString* result = [myStr stringWIthAllowedChrs:allowedChars];
result should now be @"a533";
It’s not the cleanest, but you could separate the string using a character set, and then combine the resulting array using an empty string.