This is my string:
2011-10-07T08:55:16-05:00
I am trying to remove the colon with this code:
NSRange range = NSMakeRange(dateString.length-3, 1);
NSString *temp = [dateString substringWithRange:range];
if ([temp isEqualToString:@":"])
[dateString replaceCharactersInRange:range withString:@""];
My code enters the if statement, so I know that it found the colon. But it crashes with no errors on the last line. What am I doing wrong?