• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
max size of [NSString stringWithContentsOfFile:] ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: is the mouse button pressed?
  • Next by Date: Re: is the mouse button pressed?
  • Previous by thread: Button Colours
  • Next by thread: Re: max size of [NSString stringWithContentsOfFile:] ?
  • Index(es):
    • Date
    • Thread