I have NSString *string = @"Helo"; and NSString *editedString = @"Hello";. How find index for changed character or characters (for example here is @"l").
I have NSString *string = @Helo; and NSString *editedString = @Hello; . How find
Share
I’ve written a category on NSString that will do what you want. I’ve used my StackOverflow username as a postfix on the category method. This is to stop an unlikely potential future collision with a method of the same name. Feel free to change it.
First the interface definition
NSString+Difference.h:and the implementation ‘NSString+Difference.m`:
You would use the above as follows: