• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I delete the 1st three characters from a variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How do I delete the 1st three characters from a variable
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: How do I delete the 1st three characters from a variable (From: Shane Stanley <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: kai <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: Michelle Steiner <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: kai <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: Michelle Steiner <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: kai <email@hidden>)
 >Re: How do I delete the 1st three characters from a variable (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: get size of available screen fails
  • Next by Date: Re: How do I delete the 1st three characters from a variable
  • Previous by thread: Re: How do I delete the 1st three characters from a variable
  • Next by thread: Re: How do I delete the 1st three characters from a variable
  • Index(es):
    • Date
    • Thread