我怎样才能做到这一点,以便我可以将从文件中读取的字符串拆分为单独的字符串,或者让它只读取特定的行,就像我希望它只读取文本文件的第一行并将其存储到字符串中一样。这是我用来读取文本文件的代码。
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *pday11 = [documentsDirectory stringByAppendingPathComponent:@"day11.txt"];
NSString *stringFromFileday11 = [NSString stringWithContentsOfFile:pday11 encoding:NSUTF8StringEncoding error:nil];
//If i used this to read the file how could i split up the "stringFromFileday11" into different strings where every line is a string from the file