Re: How do I delete the 1st three characters from a variable
Re: How do I delete the 1st three characters from a variable
- Subject: Re: How do I delete the 1st three characters from a variable
- From: deivy petrescu <email@hidden>
- Date: Tue, 3 Jan 2006 23:47:00 -0500
On Jan 3, 2006, at 22:20, Michelle Steiner wrote:
On Jan 3, 2006, at 7:42 PM, kai wrote:
(BTW, while some of the issues have been detailed, the performance
implications haven't actually been quantified. In case you're
wondering, 'text' executes here up to 200+ times faster than
'characters/as')
I knew it was faster, but not how much faster, and also knew that
it was more memory efficient; that's the reason I was so puzzled
that people were using characters/as
-- Michelle
--
it ain't "schadenfreude" if the bastards deserve it.
More puzzling if people had paid attention to what kai pointed out
earlier!
check this:
<script>
set AppleScript's text item delimiters to {" kai is right "}
set otexto to "this is a test"
set l to characters 1 thru 4 of otexto as text
set j to text 1 thru 4 of otexto
{l, j}
-->{"t kai is right h kai is right i kai is right s", "this"}
</script>
So, the two methods do not yield the same result.
"characters" is convenient when you need a list.
Unfortunately, if I am thinking in English and I want to get the
first four characters of a word, I would write characters 1 thru 4
of ...
But, work with AS for a while and you will likely drop the habit!
Deivy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden