• 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: Sat, 15 Jun 2002 16:51:03 -0700

At 10:42 AM -0700 6/15/02, Bill Hoffman wrote:
>The original question was on finding a good method for trimming strings. My point is simply that getting the words of a string and then recomposing them as a string to exclude leading or trailing spaces, as was suggested by someone else, is inadequate, as it may also exclude non-word elements of the original string.

Assuming that you're responding to my post, I wasn't talking about using AppleScript, but Revolution (or SuperCard or HyperCard). They have a very similar syntax to AppleScript, and built-in syntax for dealing with words, as opposed to having to set delimiters in AppleScript. The result is, as far as the original poster described, exactly what was asked for, in a single line of code:

put word 1 to -1 of tString into tString

Note that this is Transcript in Revolution, not AppleScript. Bringing this back on topic, Revolution is my tool of choice for doing AppleScript work, because it allows me to use the more powerful syntax of Transcript, but supports arbitrary execution of AppleScript as well.
--

regards,

Geoff Canyon
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.

References: 
 >Re: can I do this better? (From: Bill Hoffman <email@hidden>)

  • Prev by Date: Re: Evaluate text to boolean
  • Next by Date: BUG: Where's Application Support?
  • Previous by thread: Re: can I do this better?
  • Next by thread: Re: can I do this better?
  • Index(es):
    • Date
    • Thread