I would like to know how it is possible to omit a specific substring out an NSString, assuming the NSString does contain that substring.
For example:
Original string: “This is a string but these words should be omitted.”
Substring to omit: “but these words should be omitted“.
Result string: “This is a string.”
Thanks ahead,
iLyrical.
See
NSString‘sstringByReplacingOccurrencesOfString:withString:. You may also want to trim the trailing whitespace withstringByTrimmingCharactersInSet:.