bookmark

Objective-C: Reading a file line by line - Stack Overflow


Description

FILE *file = fopen("myfile", "r"); // check for NULL while(!feof(file)) {     NSString *line = readLineAsNSString(file);     // do stuff with line; line is autoreleased, so you should NOT release it (unless you also retain it beforehand) }

Preview

Tags

Users

  • @slbaron

Comments and Reviews