/** initialize two strings **/
NSString *string = @"This is heaven";
NSString *part = @"heaven";
/** Get the range of the substring in the original string **/
NSRange range = [string rangeOfString:part];
/** Delete the substring from the original string **/
[string deleteCharactersInRange:range];
No comments:
Post a Comment