Re: scannerWithString
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.