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

Re: Detecting new line character(s) in text file?


  • Subject: Re: Detecting new line character(s) in text file?
  • From: Ricky Sharp <email@hidden>
  • Date: Sat, 17 Nov 2007 17:44:57 -0600


On Nov 17, 2007, at 5:35 PM, Jean-Nicolas Jolivet wrote:

Thank you! I am looking into it! Seems like it will do the trick..!

Shawn Erickson wrote:

On Nov 17, 2007, at 3:29 PM, Jean-Nicolas Jolivet wrote:

I am parsing subtitles file...(text subtitles for divx movies etc..)

Depending on the format they need to be parsed differently, but in any cases, I need to find out what linebreak character is used so I can parse them...

Why do you need to care about the line ending? You just want the lines?


Still sounds like -[NSString getLineStart:end:contentsEnd:forRange:] will do what you need without you having to care about which line ending is being used.

And, that API also has the advantage that it doesn't just handle the "old-style" three end-of-line sequences; see the docs for details.


___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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


References: 
 >Detecting new line character(s) in text file? (From: Jean-Nicolas Jolivet <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: Jean-Nicolas Jolivet <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: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: Detecting new line character(s) in text file?
  • Next by Date: Re: Bridging C++ to Cocoa?
  • Previous by thread: Re: Detecting new line character(s) in text file?
  • Next by thread: Re: Detecting new line character(s) in text file?
  • Index(es):
    • Date
    • Thread