Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move files to the right folder.




On 18 Oct 2006, at 20:48, Mark J. Reed wrote:

On 10/18/06, Yvan KOENIG <email@hidden> wrote:
Is it true that sometimes we may have
ASCII character 13 & ASCII character 10
or
ASCII character 10 & ASCII character 13 ?

In theory, yes, but in practice I find that those systems which use both characters together to indicate a newline always put the \r (ASCII character 13) first. (In the case of the TELNET protocol and various derivatives - e.g.SNMP, HTTP, etc - the RFC's specifically require \r\n rather than \n\r).

Which is pretty much the interpretation when using AppleScript's "paragraph" text elements, too:


-------------------------

tell (ASCII character 10) to set l to {return, it, return & it, it & return}
repeat with i in l
set text item delimiters to i's contents
set i's contents to paragraphs of ({"a", "b", "c"} as string)
end repeat
set text item delimiters to {""}


l --> {{"a", "b", "c"}, {"a", "b", "c"}, {"a", "b", "c"}, {"a", "", "b", "", "c"}}

-------------------------

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Move files to the right folder. (From: Jan Bultereys <email@hidden>)
 >Re: Move files to the right folder. (From: Yvan KOENIG <email@hidden>)
 >Re: Move files to the right folder. (From: kai <email@hidden>)
 >Re: Move files to the right folder. (From: Yvan KOENIG <email@hidden>)
 >Re: Move files to the right folder. (From: "Mark J. Reed" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.