• 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
Re: componentsSeparatedByString and eol/lf
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: componentsSeparatedByString and eol/lf


  • Subject: Re: componentsSeparatedByString and eol/lf
  • From: Douglas Davidson <email@hidden>
  • Date: Tue, 13 Dec 2005 13:51:10 -0800


On Dec 13, 2005, at 1:44 PM, Bert Torfs wrote:

I do want to create an array from a standard text file. The records in that file are ended by a \r\n character sequence.
When I use

lineArray = [[rawData componentsSeparatedByString:@"\r\n"]retain];

everything works as expected.
However, I do not want to hard-code eol and lf characters, as I do want to be tied to a particular encoding.

I would suggest the use of getLineStart:end:contentsEnd:forRange: or getParagraphStart:end:contentsEnd:forRange:.

Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >componentsSeparatedByString and eol/lf (From: Bert Torfs <email@hidden>)

  • Prev by Date: componentsSeparatedByString and eol/lf
  • Next by Date: NSTextView/NSTextField forgetting to wordwrap?
  • Previous by thread: componentsSeparatedByString and eol/lf
  • Next by thread: NSTextView/NSTextField forgetting to wordwrap?
  • Index(es):
    • Date
    • Thread