I have an NSString that contains a value "\U2212" instead of "-" which is coming from API. When I tried to replace this string with needed character using subString occurrence method it shown error. So how do I replace my NSString that contains "\U2212" with "-". I tried the following code. Please help me. I searched many things but nothing helped. Thanks in advance.
input:"(UTC\U221206:00) Canada/Central"
Desired output:"(UTC-06:00) Canada/Central"
code:
NSString *timezoneDisplayValue = [timezone valueForKey:@"tomeZoneDisplayValue"];
timezoneDisplayValue = [timezoneDisplayValue stringByReplacingOccurrencesOfString:@"\U2212" withString:@"-"];