Is there a more efficient way of stripping a string of undesirable phrases, in this case image extensions? I understand that it's possible to use NSCharacterSet as used here: Replace multiple characters in a string in Objective-C? but for whole phrases?
    NSString *title = [imagePath lastPathComponent];
    title = [title stringByReplacingOccurrencesOfString:@".JPG" withString:@""];
    title = [title stringByReplacingOccurrencesOfString:@".JPEG" withString:@""];
    title = [title stringByReplacingOccurrencesOfString:@".PNG" withString:@""];
    title = [title stringByReplacingOccurrencesOfString:@".jpg" withString:@""];
    title = [title stringByReplacingOccurrencesOfString:@".jpeg" withString:@""];
    title = [title stringByReplacingOccurrencesOfString:@".png" withString:@""];
 
     
     
     
    