I have an array containing object let say { my saxophone, take, everywhere}. Secondly i have a NSString: ‘take my saxophone everywhere’ then how can I able to match object of array with string and get index from NSString. I need index of substring from NSString by comparing with objects of array. So that i can sort the array correctly. So far I have done
NSRange range = [feedBackAnswer rangeOfString:@"everywhere"];
if ( range.length > 0 )
{
NSLog(@"range.location..%d",range.location);
}
else
{
NSLog(@"...%d",-1);
}
But I could not find the index of substring.
& check the spelling in array (everwhere)