I am using NSComparisonResult like so:
So if searchText = @"he" then the result is true.
But if searchText = @"World", it does not return.
Is there an option to pass NSComparisonResult to get it to find within the string instead of just an exact match of the beginning?
Code:
NSString *haystackText = @"Hello World";
NSComparisonResult result = [haystackText compare:searchText options:NSCaseInsensitiveSearch range:NSMakeRange(0, [searchText length])];
So if searchText = @"he" then the result is true.
But if searchText = @"World", it does not return.
Is there an option to pass NSComparisonResult to get it to find within the string instead of just an exact match of the beginning?