Re: Position of an element in a list
Re: Position of an element in a list
- Subject: Re: Position of an element in a list
- From: Shane Stanley <email@hidden>
- Date: Thu, 3 Aug 2017 09:35:27 +1000
On 3 Aug 2017, at 8:45 am, Nigel Garvey <email@hidden> wrote:
>
> the version here seems a bit perverse
But in a very attractive way :-)
It could be good for long lists, although in practice they tend to consist of
items of the same class, in which case you can also use:
set theIndex to (theArray's valueForKey:"lowercaseString")'s
indexOfObject:(aValue's lowercaseString())
Obviously that fails if the list items aren't all strings.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
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