Re: can I do this better?
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.