I am having an array like fallowing,
NSArray*array = [NSArray arrayWithObjects:@"1.1 something", @"1.2 something else", @"1.3 out of left field", @"1.4 yet another!", nil];
Now,i am having the string like fallowing,
NSString*str = @"1.3";
Now i will send the str .Then it needs to find that str in array and it need to return the index of object where that text found.Means i need index 2 has to come as output.Can anyone share the code please.Thanks in advance.
Try
Or (because you somehow like oneliners):