Re: max size of [NSString stringWithContentsOfFile:] ?
Re: max size of [NSString stringWithContentsOfFile:] ?
- Subject: Re: max size of [NSString stringWithContentsOfFile:] ?
- From: Nathan Day <email@hidden>
- Date: Wed, 29 May 2002 20:25:41 +0930
An int is 32 bits not 16 bits so the maximum value of an unsigned int is
2^32. I can hear the sound of your palm hitting your forehead from here.
On Wednesday, May 29, 2002, at 07:14 PM, Martin Bauer wrote:
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.
_______________________________________________
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.