• 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
Detecting new line character(s) in text file?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting new line character(s) in text file?


  • Subject: Detecting new line character(s) in text file?
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Sat, 17 Nov 2007 17:51:20 -0500

My application deals with text files... each line has to be parsed so I split it with

[str componentsSeparatedByString:@"\n"]

however..this only works if I have a text file that was saved on a mac... Is there an easy way to determine which new line character is used in a textfile (eighther linux, mac or win) and then use this for parsing afterward?
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Detecting new line character(s) in text file?
      • From: mmalc crawford <email@hidden>
    • Re: Detecting new line character(s) in text file?
      • From: Shawn Erickson <email@hidden>
    • Re: Detecting new line character(s) in text file?
      • From: John Labovitz <email@hidden>
  • Prev by Date: Re: Safe asynchronous file copies
  • Next by Date: Re: Detecting new line character(s) in text file?
  • Previous by thread: NSPDFImageRep / PDFOperationWithView question
  • Next by thread: Re: Detecting new line character(s) in text file?
  • Index(es):
    • Date
    • Thread