I want to extract all “daughter” of a NSarray.
For example, nsarray is made like this:
hello
hi
hello daughter
my goodness
daughter (someone)
my daughter
how are you?
etc.
And I want to extract all lines that contain “daughter”. Could you point me in right direction?
My current code is:
for (NSString *mystring in self.array)
{
if ([mystring rangeOfString:searchText].location!=NSNotFound)
{
NSUInteger idx = [self.array indexOfObject:mystring];
[self.filterarray addObject: mystring];
}
}
(requires iOS 4.0 or later)
If you need to support earlier system versions use this:
(requires iOS 3.0 or later)