• 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: scannerWithString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scannerWithString


  • Subject: Re: scannerWithString
  • From: Andreas Mayer <email@hidden>
  • Date: Fri, 24 May 2002 20:39:55 +0200

Am Freitag den, 24. Mai 2002, um 14:27, schrieb zauhar:

// Divvy the file contents (lines) into an array of NSstrings
using \n as separator

typeLines = [ typeContents componentsSeparatedByString:@"\n" ] ;

This will not work, if the lines are seperated by some other character(s) than LF.

NSString's getLineStart:end:contentsEnd:forRange: accepts every delimiter I know of (and some more ;-)):

---
A line is delimited by any of these characters, the longest possible sequence being preferred to any shorter:

 U+000D (\r or CR)
 U+2028 (Unicode line separator)
 U+000A (\n or LF)
 U+2029 (Unicode paragraph separator)
 \r\n, in that order (also known as CRLF)
---

bye. Andreas.
_______________________________________________
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.

  • Follow-Ups:
    • Re: scannerWithString
      • From: Ondra Cada <email@hidden>
References: 
 >Re: scannerWithString (From: zauhar <email@hidden>)

  • Prev by Date: Re: C++ Strings Handling
  • Next by Date: Re: C++ Strings Handling
  • Previous by thread: Re: scannerWithString
  • Next by thread: Re: scannerWithString
  • Index(es):
    • Date
    • Thread