Re: Snow Leopard AppleScript Release Notes
Re: Snow Leopard AppleScript Release Notes
- Subject: Re: Snow Leopard AppleScript Release Notes
- From: Christopher Nebel <email@hidden>
- Date: Mon, 31 Aug 2009 20:05:49 -0700
On Aug 29, 2009, at 10:53 PM, John C. Welch wrote:
On 8/29/09 1:17 AM, "Michelle Steiner" <email@hidden> wrote:
When getting the text items of a string, all the values in text
item
delimiters are considered. Previous versions only considered the
first
item in the list. [1186965]
Somehow, I smell drama coming...
set foo to "123,46;abc)hello"
set text item delimiters to {",", ";", ")"}
text items of foo
--> {"123", "46", "abc", "hello"}
That's really nice when you think about it.
It's also what the AppleScript Language Guide has said for years that
it was supposed to do, but then immediately backpedaled and said that
it currently didn't:
"AppleScript provides the text item delimiters property for use in
processing text. This property consists of a list of strings used as
delimiters by AppleScript when it coerces a list to text or gets text
items from text strings. AppleScript currently uses only the first
delimiter in the list."
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden