Re: Convert first char to lower case
Re: Convert first char to lower case
- Subject: Re: Convert first char to lower case
- From: Nigel Garvey <email@hidden>
- Date: Wed, 9 Jan 2002 22:53:01 +0000
Paul Berkowitz wrote on Wed, 09 Jan 2002 08:53:20 -0800:
>
On 1/9/02 4:55 AM, "Nigel Garvey" <email@hidden>
>
wrote:
>
> has's suggestion uses an
>
> implicit 'get' command. An explicit one also works:
>
>
>
> set AppleScript's text item delimiters to (get {character 1 of
>
> Variable1})
>
>
>
I'm accustomed to this sort of thing in applications I use, and am wondering
>
if that is the correct explicit get , or if it should be this one instead:
>
>
set AppleScript's text item delimiters to {get (character 1 of Variable1)}
I think they're probably both legimate here. They produce the same result
- mine because it's presented as an instruction to get the described
list, yours because it's written as a list containing an instruction to
get the described character.
>
What has actually did, in addition to using an implicit 'get', was remove
>
the list from the tids entirely and force it to be coerced. Somebody tested
>
recently and claimed that
>
>
set AppleScript's text item delimiters to "a"
>
>
actually worked faster than
>
>
set AppleScript's text item delimiters to {"a"}
>
>
which is the correct terminology. I didn't "like" this result - why should
>
the wrong terminology work better than the right one,
It takes longer to set a variable to a new string in a new list than it
does to set it to the new string directly.
>
but I don't know how
>
these things really work "under the hood". Until the day if/when/never
>
multiple delimiters are introduced, should we really revert back to the
>
incorrect 'string' from the correct 'list of string'?
I think I remember Chris Nebel saying some time ago that if multiple
delimiters were ever implemented, a bare string would still be acceptable
in place of a single-item list.
NG