My solution about challenge2 in chapter17

[/code]
#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
@autoreleasepool {

    NSString *nameString =
    [NSString stringWithContentsOfFile:@"/usr/share/dict/propernames"
                              encoding: NSUTF8StringEncoding
                                 error:NULL];
    NSString *name2String =
    [NSString stringWithContentsOfFile:@"/usr/share/dict/words"
                              encoding:NSUTF8StringEncoding
                                 error:NULL];
    NSArray *names = [nameString componentsSeparatedByString:@"\n"];
    NSArray *names2 = [name2String componentsSeparatedByString:@"\n"];
    for (NSString *n2 in names2)
   {
        
    for (NSString *n in names){
        NSRange r = [n rangeOfString:n2 options:NSCaseInsensitiveSearch];
        if (r.location != NSNotFound){
            NSLog(@"%@",n);
        }
    }
    }
    // insert code here...
    NSLog(@"Hello, World!");
}
return 0;

}

[code]