• 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: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]


  • Subject: Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
  • From: Skeeve <email@hidden>
  • Date: Mon, 27 Oct 2008 14:48:09 +0100

If there is a possible optimisation, please share.
Sure there are. Why do you use "characters" when there are already string functions?

set StringLength to count of characters in StringSource

--better--> set StringLength to length of StringSource

and

set TargetString to (characters StartCount thru StringEnd of StringSource) as string

--better--> set TargetString to text StartCount thru StringEnd


and when you create a handler for this why not catch the case that Charcount+Startcount is higher than the string's length?



_______________________________________________ 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
  • Follow-Ups:
    • Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
      • From: AndrĂ© Berg <email@hidden>
    • Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
      • From: Christopher Nebel <email@hidden>
    • Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
      • From: Skeeve <email@hidden>
References: 
 >Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)] (From: Emile Schwarz <email@hidden>)

  • Prev by Date: Re: AppleScript strings fail
  • Next by Date: Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
  • Previous by thread: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
  • Next by thread: Re: Ma always said: there is a time to take and a time to give [Mid(Source, Start, End)]
  • Index(es):
    • Date
    • Thread