How I can get the position/Index of a substring within an NSString?
I am finding the location in the following way.
NSRange range = [string rangeOfString:searchKeyword];
NSLog (@"match found at index:%u", range.location);
This returns index:2147483647 when searchKeyword is a substring within string.
How i can get the index value like 20 or 5 like that?
2147483647is the same thing asNSNotFound, which means the string you searched for (searchKeyword) wasn’t found.