• 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: can I do this better?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can I do this better?


  • Subject: Re: can I do this better?
  • From: Geoff Canyon <email@hidden>
  • Date: Fri, 14 Jun 2002 20:06:10 -0700

At 12:47 PM -0500 6/12/02, garrett wrote:
>I wrote this little routine to trim off any trailing or beginning spaces or
>returns. would any of u pros do it differently or better? if so, how and
>why?

Apologies for the slightly off-topic post, but this is such an excellent example for the use of chunk expressions I couldn't resist. Chunks are available in HyperCard, SuperCard, and Revolution, all of which support AppleScript execution as well (in different ways).

In chunks, the above could be accomplished with:

put word 1 to -1 of tString into tString

I don't remember if HyperCard or SuperCard support negative chunk expressions. If they don't, the expression would be a bit more complicated, but still a single line.

http://www.apple.com/hypercard
http://www.incwell.com/SuperCard
http://www.runrev.com
--

regards,

Geoff Canyon
email@hidden
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: can I do this better?
      • From: Jon Pugh <email@hidden>
References: 
 >can I do this better? (From: garrett <email@hidden>)

  • Prev by Date: Re: Shell script installer? Or primer?
  • Next by Date: Re: can I do this better?
  • Previous by thread: Re: can I do this better?
  • Next by thread: Re: can I do this better?
  • Index(es):
    • Date
    • Thread