max size of [NSString stringWithContentsOfFile:] ?
max size of [NSString stringWithContentsOfFile:] ?
- Subject: max size of [NSString stringWithContentsOfFile:] ?
- From: Martin Bauer <email@hidden>
- Date: Wed, 29 May 2002 11:44:54 +0200
hi all,
i am using the (convenient) stringWithContentsOfFile: function to read in text files;
in the documentation i see that length: returns an unsigned int, meaning that the maximum length of a string is 65535 characters, am i getting this right?
therefore, related to the "scannerWithString" thread of last week, if i want to read in a really large file (is 65k already really large?) in an array of lines (each line shorter than maximum string length), how can i do this?
right now i am reading the whole file and using jerome laurens "splitLines" function, hoping that the file fits into the string.
btw, what happens if it does not fit? does it get cut, or do i get an error?
--
cheers, martin.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.