I want to remove \"#\" from my string.
I have tried
NSString *abc = [@\"A#BCD#D\" stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWith
I previously had a relatively complicated recursive answer for this (see edit history of this answer if you'd like to see that answer), but then I found a pretty simple one liner:
- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)characterSet {
return [[self componentsSeparatedByCharactersInSet:characterSet] componentsJoinedByString:@""];
}