ファイルから読み取った文字列を個別の文字列に分割したり、テキスト ファイルの最初の行のみを読み取ってそれを文字列に格納したい場合のように、特定の行のみを読み取ったりできるようにするにはどうすればよいでしょうか。これは、テキストファイルを読み取るために使用するコードです。
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