I am aware of replacing Strings of a String, but that only works if I know exactly what I want to remove.
If I have a String like the following:
\"hi-there-t
Look up pattern-matching, aka regular expressions.
Oh, wow, TIL there's no built-in way to do regular expressions in an Objective-C Cocoa? according to Regular expressions in an Objective-C Cocoa application
Anyway, there are libs mentioned in that question.
It can be done without REGEX like this:
NSString *string = @"hi-there-this-is-a-test&feature=hi-there";
NSRange range = [string rangeOfString:@"&feature"];
NSString *shortString = [string substringToIndex:range.location];